docs: def is_device(obj):
      """
      Returns True if obj is a device type (derived from DeviceBase), but not defined in
      :mod:`lewis.core.devices` or :mod:`lewis.devices`.
  
      :param obj: Object to test.
      :return: True if obj is a device type.
      """
      return isinstance(obj, type) and issubclass(
          obj, DeviceBase) and obj.__module__ not in ('lewis.devices', 'lewis.core.devices')