def _check_action(action):
if isinstance(action, types.StringTypes):<EOL><INDENT>action = action.lower()<EOL><DEDENT>if action not in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>raise SpamCError('<STR_LIT>')<EOL><DEDENT>return action<EOL>
check for invalid actions