def IndexToKey(index):
  props = []
  if index.properties is not None:
    for prop in index.properties:
      if prop.direction == 'asc':
        direction = ASCENDING
      else:
        direction = DESCENDING
      props.append((prop.name, direction))
  return index.kind, index.ancestor, tuple(props)
Convert Index to key.
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/datastore/datastore_index.py/IndexToKey