def require_valid_intent(intent):
 if (intent not in feconf.VALID_MODERATOR_ACTIONS):
  raise Exception(('Unrecognized email intent: %s' % intent))

def require_valid_intent ( intent ) : if ( intent not in feconf . VALID_MODERATOR_ACTIONS ) : raise Exception ( ( 'Unrecognized email intent: %s' % intent ) )
checks if the given intent is valid .