Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
template : str, optional
Set the ``display_template``.
macros : dict, optional
Macro substitutions to be placed in template.
**kwargs
Extra arguments are used at device instantiation.
Returns
-------
TyphosDeviceDisplay
"""
try:
obj = pcdsutils.utils.get_instance_by_name(klass, **kwargs)
except Exception:
logger.exception('Failed to generate TyphosDeviceDisplay from '
'device %s', obj)
return None
return cls.from_device(obj, template=template, macros=macros)