def has_identity(object):
 state = attributes.instance_state(object)
 return state.has_identity

def has_identity ( object ) : state = attributes . instance_state ( object ) return state . has_identity
return true if the given object has a database identity .