<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, regexp):
 """ Register a new command :param str regexp: Regular expression matching the command to register :Example: """


        def decorator(fn):
            self.add_command(regexp, fn)
            return fn

        return decorator