<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def command(self, func):
 """ Decorator to add a command function to the registry. :param func: command function. """

        command = Command(func)
        self._commands[func.__name__] = command
        return func