def _MinimalEntityInfo(self, entity_proto, query):
    entity_info = datastore_pb.EntityProto()
    order_names = [o.property() for o in query.order_list()]
    entity_info.mutable_key().MergeFrom(entity_proto.key())
    entity_info.mutable_entity_group().MergeFrom(entity_proto.entity_group())
    for prop in entity_proto.property_list():
      if prop.name() in order_names:
        entity_info.add_property().MergeFrom(prop)
    return entity_info
Extract the minimal set of information that preserves entity order.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/datastore/old_datastore_stub_util.py/ListCursor._MinimalEntityInfo