<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_default_command(self, command):
 """Sets a command function as the default command."""

        cmd_name = command.name
        self.add_command(command)
        self.default_cmd_name = cmd_name