code: def command(self, *args, **kwargs):
          
          def decorator(func):
              kwargs.setdefault('parent', self)
              result = command(*args, **kwargs)(func)
              self.add_command(result)
              return result
  
          return decorator
docs: A shortcut decorator that invokes :func:`.command` and adds it to
          the internal command list via :meth:`~.GroupMixin.add_command`.