def is_complete_v4_key(v4_key):
  """Returns True if a key specifies an ID or name, False otherwise.

  Args:
    v4_key: an entity_v4_pb.Key

  Returns:
    True if the key specifies an ID or name, False otherwise.
  """
  assert 1 >= len(v4_key.path_element_list())
  last_element = v4_key.path_element(len(v4_key.path_element_list()) - 1)
  return last_element.has_id() or last_element.has_name()
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/datastore/datastore_pbs.py/is_complete_v4_key/swapped operands of `>=`