def get_table_name_pairs(db):
    tables = get_all_table_names(db)
    loctables, regtables = [], []
    for table in tables:
        if table.startswith('_') and table.endswith('_loc_'):
            loctables.append(table)
        else:
            regtables.append(table)

    pairs = []
    for regtable in regtables:
        if ('_%s_loc_' % regtable) in loctables:
            pairs.append((regtable, '_%s_loc_' % regtable))
        else:
            pairs.append((regtable, None))
    return pairs
dataset/ETHPy150Open sirrice/dbtruck/dbtruck/analyze/hidden.py/get_table_name_pairs/original