def add_default(cfg):
    if isinstance(cfg, dict):
        if 'value' in cfg.keys():
            cfg['default'] = cfg['value']
        else:
            for top_level_key in cfg.keys():
                add_default(cfg[top_level_key])