<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_command(parent_command, name):
 """Create and register a command with a parent command. Args ---- parent_comand : Command The parent command. name : str Name given to the created Command instance. Example ------- .. testcode:: mygit = Command(name='status') @register_command(mygit, 'status') def status():
 print 'Nothing to commit.' .. doctest:: :hide: Nothing to commit. """

    def wrapper(func):
        c = command(name)(func)
        parent_command.add_subcommand(c)
    return wrapper