code: def get_uid(self, context, value):
          
          # Empty string or list with single empty string, are commonly
          # passed to us from form submissions
          if not value or value == ['']:
              ret = ''
          elif api.is_brain(value):
              ret = value.UID
          elif api.is_at_content(value) or api.is_dexterity_content(value):
              ret = value.UID()
          elif api.is_uid(value):
              ret = value
          else:
              raise ReferenceException("{}.{}: Cannot resolve UID for {}".format(
                  context, self.getName(), value))
          return ret
docs: Takes a brain or object (or UID), and returns a UID.
  
          :param context: context is the object who's schema contains this field.
          :type context: BaseContent
          :param value: Brain, object, or UID.
          :type value: Any
          :return: resolved UID.
          :rtype: string