def register_operators(*operators):
def validate(operator):<EOL><INDENT>if isoperator(operator):<EOL><INDENT>return True<EOL><DEDENT>raise NotImplementedError('<STR_LIT>'.format(operator))<EOL><DEDENT>def register(operator):<EOL><INDENT>for name in operator.operators:<EOL><INDENT>if name in Engine.operators:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>'.format(<EOL>name,<EOL>operator.__name__<EOL>))<EOL><DEDENT>Engine.operators[name] = operator<EOL><DEDENT><DEDENT>[register(operator) for operator in operators if validate(operator)]<EOL>
Registers one or multiple operators in the test engine.