Process commands that target specific nodes.

def node_cmd(cmd_name, node_dict):
    """Process commands that target specific nodes."""
    sc = {"run": cmd_startstop, "stop": cmd_startstop,
          "connect": cmd_connect, "details": cmd_details}
    node_num = node_selection(cmd_name, len(node_dict))
    refresh_main = None
    if node_num != 0:
        (node_valid, node_info) = node_validate(node_dict, node_num, cmd_name)
        if node_valid:
            sub_cmd = sc[cmd_name]  # get sub-command
            refresh_main = sub_cmd(node_dict[node_num], cmd_name, node_info)
        else:  # invalid target
            ui_print_suffix(node_info, C_ERR)
            sleep(1.5)
    else:  # '0' entered - exit command but not program
        ui_print(" - Exit Command")
        sleep(0.5)
    return refresh_main