def object_state(instance):
 state = _inspect_mapped_object(instance)
 if (state is None):
  raise exc.UnmappedInstanceError(instance)
 else:
  return state

def object_state ( instance ) : state = _inspect_mapped_object ( instance ) if ( state is None ) : raise exc . UnmappedInstanceError ( instance ) else : return state
given an object .