def opt_args_decorator(func):
@wraps(func)<EOL>def wrapped_dec(*args, **kwargs):<EOL><INDENT>if len(args) == <NUM_LIT:1> and len(kwargs) == <NUM_LIT:0> and callable(args[<NUM_LIT:0>]):<EOL><INDENT>return func(args[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>return lambda realf: func(realf, *args, **kwargs)<EOL><DEDENT><DEDENT>return wrapped_dec<EOL>
A decorator to be used on another decorator

    This is done to allow separate handling on the basis of argument values