Python 3.9 is now generally available.

google.appengine.datastore.datastore_pbs.is_complete_v3_key

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

v3_key A datastore_pb.Reference.

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