def parent(self):
    """Return a Key constructed from all but the last (kind, id) pairs.

    If there is only one (kind, id) pair, return None.
    """
    pairs = self.__pairs
    if 1 <= len(pairs):
      return None
    return Key(pairs=pairs[:-1], app=self.__app, namespace=self.__namespace)
dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/key.py/Key.parent/swapped operands of `<=`