def UserPropertyToProto(prop, index):
  # No default for {MessageField}s
  kwargs = GetKeywordArgs(prop, include_default=False)
  return messages.MessageField(UserMessage, index, **kwargs)
Converts a model property to a user message field.
dataset/ETHPy150Open GoogleCloudPlatform/endpoints-proto-datastore/endpoints_proto_datastore/ndb/utils.py/UserPropertyToProto