@internal<EOL>def _mkOp(fn):
def op(*operands, key=None) -> RtlSignalBase:<EOL><INDENT>"""<STR_LIT>"""<EOL>assert operands, operands<EOL>top = None<EOL>if key is not None:<EOL><INDENT>operands = map(key, operands)<EOL><DEDENT>for s in operands:<EOL><INDENT>if top is None:<EOL><INDENT>top = s<EOL><DEDENT>else:<EOL><INDENT>top = fn(top, s)<EOL><DEDENT><DEDENT>return top<EOL><DEDENT>return op<EOL>
Function to create variadic operator function

:param fn: function to perform binary operation