def proxy_settings_module(depth=<NUM_LIT:3>):
proxies = []<EOL>modules = sys.modules<EOL>module_name = get_frame_locals(depth)['<STR_LIT>']<EOL>module_real = modules[module_name]<EOL>for name, locals_dict in traverse_local_prefs(depth):<EOL><INDENT>value = locals_dict[name]<EOL>if isinstance(value, PrefProxy):<EOL><INDENT>proxies.append(name)<EOL><DEDENT><DEDENT>new_module = type(module_name, (ModuleType, ModuleProxy), {})(module_name)  <EOL>new_module.bind(module_real, proxies)<EOL>modules[module_name] = new_module<EOL>
Replaces a settings module with a Module proxy to intercept
    an access to settings.

    :param int depth: Frame count to go backward.