code: def register_command(self, name, command):
          
          if name in self.commands:
              raise RuntimeError('%s is already defined' % name)
          self.commands[name] = command
docs: Registers the `command` with the given `name`.
  
          If the `name` has already been used to register a command a
          :exc:`RuntimeError` will be raised.