code: def _get_object(context, value):
      
      if not value:
          return None
      if api.is_brain(value):
          return api.get_object(value)
      if api.is_object(value):
          return value
      if api.is_uid(value):
          uc = api.get_tool('uid_catalog', context=context)
          brains = uc(UID=value)
          if len(brains) == 0:
              # Broken Reference!
              logger.warn("Reference on {} with UID {} is broken!"
                          .format(repr(context), value))
              return None
          return brains[0].getObject()
      return None
docs: Resolve a UID to an object.
  
      :param context: context is the object containing the field's schema.
      :type context: BaseContent
      :param value: A UID.
      :type value: string
      :return: Returns a Content object or None.
      :rtype: BaseContent