def __gt__(self, other):
    """Greater than ordering."""
    if not isinstance(other, Key):
      return NotImplemented
    return other.__tuple() > self.__tuple()
dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/key.py/Key.__gt__/swapped operands of `>`