code: def dual_use_decorator(fn):
      
      @functools.wraps(fn)
      def decorator(*args, **kw):
          if len(args) == 1 and not kw and callable(args[0]):
              return fn()(args[0])
          else:
              return fn(*args, **kw)
      return decorator
docs: Turn a function into a decorator that can be called with or without
      arguments.