code: def _objectify(field, value, ns_info):
      
      if (getattr(field.type_, "_treat_none_as_empty_list", False) and
              value is None):
          return []
  
      if value is None:
          return None
      elif field.type_:
          return value.to_obj(ns_info=ns_info)
      return field.binding_value(value)
docs: Make `value` suitable for a binding object.
  
      If `value` is an Entity, call to_obj() on it. Otherwise, pass it
      off to the TypedField for an appropriate value.