def is_complete_v3_key(v3_key):
 assert (v3_key.path().element_size() >= 1)
 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() != '')))

def is_complete_v3_key ( v3_key ) : assert ( v3_key . path ( ) . element_size ( ) >= 1 ) 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 ( ) != '' ) ) )
returns true if a key specifies an id or name .