def _state_session(state):
 if state.session_id:
  try:
   return _sessions[state.session_id]
  except KeyError:
   pass
 return None

def _state_session ( state ) : if state . session_id : try : return _sessions [ state . session_id ] except KeyError : pass return None
given an :class: .