Show only the text in labels that mater from the cfgdict

def make_cfglbls(cfgdict_list, varied_dict):
    """  Show only the text in labels that mater from the cfgdict """
    import textwrap
    wrapper = textwrap.TextWrapper(width=50)
    cfglbl_list =  []
    for cfgdict_ in cfgdict_list:
        cfgdict = cfgdict_.copy()
        for key in six.iterkeys(cfgdict_):
            try:
                vals = varied_dict[key]
                # Dont print label if not varied
                if len(vals) == 1:
                    del cfgdict[key]
                else:
                    # Dont print label if it is None (irrelevant)
                    if cfgdict[key] is None:
                        del cfgdict[key]
            except KeyError:
                # Don't print keys not in varydict
                del cfgdict[key]
        cfglbl = six.text_type(cfgdict)
        search_repl_list = [('\'', ''), ('}', ''),
                            ('{', ''), (': ', '=')]
        for search, repl in search_repl_list:
            cfglbl = cfglbl.replace(search, repl)
        #cfglbl = str(cfgdict).replace('\'', '').replace('}', '').replace('{', '').replace(': ', '=')
        cfglbl = ('\n'.join(wrapper.wrap(cfglbl)))
        cfglbl_list.append(cfglbl)
    return cfglbl_list