def execute_command(self, command, args=None):
if args is None:<EOL><INDENT>args = {}<EOL><DEDENT>command_fn = self.commands[command]<EOL>return command_fn(**args)<EOL>
Execute a command

:param command: name of the command
:type command: str
:param args: optional named arguments for command
:type args: dict
:return: the result of command
:raises KeyError: if command is not found