def describe(value):
  """Describe any value as a descriptor.

  Helper function for describing any object with an appropriate descriptor
  object.

  Args:
    value: Value to describe as a descriptor.

  Returns:
    Descriptor message class if object is describable as a descriptor, else
    None.
  """
  from . import remote
  if isinstance(value, types.ModuleType):
    return describe_file(value)
  elif callable(value) or hasattr(value, 'remote'):
    return describe_method(value)
  elif isinstance(value, messages.Field):
    return describe_field(value)
  elif isinstance(value, messages.Enum):
    return describe_enum_value(value)
  elif isinstance(value, type):
    if issubclass(value, messages.Message):
      return describe_message(value)
    elif issubclass(value, messages.Enum):
      return describe_enum(value)
    elif issubclass(value, remote.Service):
      return describe_service(value)
  return None
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/descriptor.py/describe/operator `and` -> `or`