code: def get_object_by_uid(uid, default=_marker):
      
  
      # nothing to do here
      if not uid:
          if default is not _marker:
              return default
          fail("get_object_by_uid requires UID as first argument; got {} instead"
               .format(uid))
  
      # we defined the portal object UID to be '0'::
      if uid == '0':
          return get_portal()
  
      # we try to find the object with both catalogs
      pc = get_portal_catalog()
      uc = get_tool("uid_catalog")
  
      # try to find the object with the reference catalog first
      brains = uc(UID=uid)
      if brains:
          return brains[0].getObject()
  
      # try to find the object with the portal catalog
      res = pc(UID=uid)
      if not res:
          if default is not _marker:
              return default
          fail("No object found for UID {}".format(uid))
  
      return get_object(res[0])
docs: Find an object by a given UID
  
      :param uid: The UID of the object to find
      :type uid: string
      :returns: Found Object or None