@wraps(fn)
def wrapped_decorator(*args, **kwargs):
    if ((len(args) == 1) and callable(args[0]) and (not kwargs)):
        return fn(args[0], **kwargs)
    else:

        def real_decorator(decoratee):
            return fn(decoratee, *args, **kwargs)
        return real_decorator
@wraps(fn)
def wrapped_decorator(*args, **kwargs):
    if ((len(args) == 1) and callable(args[0]) and (not kwargs)):
        return fn(args[0], **kwargs)
    else:

        def real_decorator(decoratee):
            return fn(decoratee, *args, **kwargs)
        return real_decorator