<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def act(self, cmd_name, params=None):
 """ Run the specified command with its parameters."""


        command = getattr(self, cmd_name)
        if params:
            command(params)
        else:
            command()