def checkSessionType(assoc_type, session_type):
 if (session_type not in getSessionTypes(assoc_type)):
  raise ValueError(('Session type %r not valid for assocation type %r' % (session_type, assoc_type)))

def checkSessionType ( assoc_type , session_type ) : if ( session_type not in getSessionTypes ( assoc_type ) ) : raise ValueError ( ( 'Session type %r not valid for assocation type %r' % ( session_type , assoc_type ) ) )
check to make sure that this pair of assoc type and session type are allowed .