def model_from_protobuf(pb, _entity_class=datastore.Entity):

  entity = _entity_class.FromPb(pb, default_kind=Expando.kind())
  return class_for_kind(entity.kind()).from_entity(entity)
Decodes a model instance from a protocol buffer.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/db/__init__.py/model_from_protobuf