def get_command_changes(self, current_commands, updated_commands):
commands_to_kill = {}<EOL>commands_to_keep = {}<EOL>commands_to_start = {}<EOL>for current_name, current_command in list(current_commands.items()):<EOL><INDENT>if current_name in list(updated_commands.keys()) andcurrent_command == updated_commands[current_name] andnot current_name.startswith('<STR_LIT>'):<EOL><INDENT>commands_to_keep[current_name] = current_command<EOL><DEDENT>else:<EOL><INDENT>commands_to_kill[current_name] = current_command<EOL><DEDENT><DEDENT>for updated_name, updated_command in list(updated_commands.items()):<EOL><INDENT>if updated_name not in list(commands_to_keep.keys()):<EOL><INDENT>commands_to_start[updated_name] = updated_command<EOL><DEDENT><DEDENT>return commands_to_kill, commands_to_keep, commands_to_start<EOL>
Compares the current command with updated command to return a 3-tuple of dicts,
keyed by command name: commands_to_kill, commands_to_keep and commands_to_start.