import copy
import re


def dict_dropdown(data_dict):
    """
    Update dictionary keys to be more guest readable for dropdown menus.
    """
    data_dict_out = copy.deepcopy(data_dict)
    for key in data_dict_out.keys():
        if 'data' in data_dict_out[key]:
            data_dict_out[key]['data'] = {k: re.sub(r" \(.*\)", "", v) for k, v in data_dict_out[key]['data'].items()}
            data_dict_out[key]['data'] = {k: re.sub(r"client", "Guest", v, flags=re.I) for k, v in data_dict_out[key]['data'].items()}
    return data_dict_out