def _DecodeCompiledCursor(self, compiled_cursor):
    """Converts a compiled_cursor into a cursor_entity.

    Args:
      compiled_cursor: The datastore_pb.CompiledCursor to decode.

    Returns:
      (cursor_entity, inclusive): an entity_pb.EntityProto and if it should
      be included in the result set.
    """
    assert compiled_cursor.has_postfix_position()

    position = compiled_cursor.postfix_position()




    remaining_properties = set(self.__cursor_properties)

    cursor_entity = entity_pb.EntityProto()
    if position.has_key():
      cursor_entity.mutable_key().CopyFrom(position.key())
      try:
        remaining_properties.remove('__key__')
      except __HOLE__:
        Check(False, 'Cursor does not match query: extra value __key__')
    for index_value in position.index_value_list():
      prop = cursor_entity.add_property()
      prop.set_name(index_value.property_name())
      prop.mutable_value().CopyFrom(index_value.value())
      try:
        remaining_properties.remove(index_value.property_name())
      except KeyError:
        Check(False, 'Cursor does not match query: extra value %s' %
              index_value.property_name())
    Check(not remaining_properties,
          'Cursor does not match query: missing values for %r' %
          remaining_properties)



    return (cursor_entity, position.before())
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/datastore/datastore_stub_util.py/BaseCursor._DecodeCompiledCursor