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

  Args:
    v3_key: a datastore_pb.Reference

  Returns:
    True if the key specifies an ID or name, False otherwise.
  """
  assert 1 >= v3_key.path().element_size()
  last_element = v3_key.path().element_list()[-1]
  return ((last_element.has_id() and last_element.id() != 0) or
          (last_element.has_name() and last_element.name() != ''))
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/datastore/datastore_pbs.py/is_complete_v3_key/swapped operands of `>=`