Print Table for dict=formatted list conditionally include numbers.

def indx_table(node_dict, tbl_mode=False):
    """Print Table for dict=formatted list conditionally include numbers."""
    nt = PrettyTable()
    nt.header = False
    nt.padding_width = 2
    nt.border = False
    clr_num = C_TI + "NUM"
    clr_name = C_TI + "NAME"
    clr_state = "STATE" + C_NORM
    t_lu = {True: [clr_num, "NAME", "REGION", "CLOUD",
                   "SIZE", "PUBLIC IP", clr_state],
            False: [clr_name, "REGION", "CLOUD", "SIZE",
                    "PUBLIC IP", clr_state]}
    nt.add_row(t_lu[tbl_mode])
    for i, node in node_dict.items():
        state = C_STAT[node.state] + node.state + C_NORM
        inum = C_WARN + str(i) + C_NORM
        if node.public_ips:
            n_ip = node.public_ips
        else:
            n_ip = "-"
        r_lu = {True: [inum, node.name, node.zone, node.cloud,
                       node.size, n_ip, state],
                False: [node.name, node.zone, node.cloud,
                        node.size, n_ip, state]}
        nt.add_row(r_lu[tbl_mode])
    if not tbl_mode:
        print(nt)
    else:
        idx_tbl = nt.get_string()
        return idx_tbl