def make_transient(instance):
 state = attributes.instance_state(instance)
 s = _state_session(state)
 if s:
  s._expunge_states([state])
 state.expired_attributes.clear()
 if state.callables:
  del state.callables
 if state.key:
  del state.key
 if state._deleted:
  del state._deleted

def make_transient ( instance ) : state = attributes . instance_state ( instance ) s = _state_session ( state ) if s : s . _expunge_states ( [ state ] ) state . expired_attributes . clear ( ) if state . callables : del state . callables if state . key : del state . key if state . _deleted : del state . _deleted
make the given instance transient .