Python 3.9 is now generally available.

google.appengine.datastore.datastore_pbs.is_complete_v4_key

Returns True if a key specifies an ID or name, False otherwise.

v4_key An entity_v4_pb2.Key.

True if the key specifies an ID or name, False otherwise.