def _DictToTuple(to_sort):
  items = to_sort.items()
  items.sort(key=lambda pair: pair[1])
  return tuple(pair[0] for pair in items)
Converts a dictionary into a tuple of keys sorted by values.
dataset/ETHPy150Open GoogleCloudPlatform/endpoints-proto-datastore/endpoints_proto_datastore/utils.py/_DictToTuple