docs: def optional_arg_class_decorator(fn):
      """
      Based on:
      https://stackoverflow.com/questions/3888158/python-making-decorators-with-optional-arguments
      """
      @functools.wraps(fn)
      def wrapped_decorator(*args, **kwargs):
          if len(args) == 1 and isinstance(args[0], type) and not kwargs:
              return fn(args[0])
          else:
              def real_decorator(decoratee):
                  return fn(decoratee, *args, **kwargs)
              return real_decorator
      return wrapped_decorator