def with_proxies(proxy_map, get_key):
def wrapper(cls):<EOL><INDENT>for label, ProxiedClass in six.iteritems(proxy_map):<EOL><INDENT>proxy = proxy_factory(cls, label, ProxiedClass, get_key)<EOL>setattr(cls, label, proxy)<EOL><DEDENT>return cls<EOL><DEDENT>return wrapper<EOL>
Class decorator factory; adds proxy class variables to target class.

    :param dict proxy_map: Mapping between class variable labels and proxied
        classes
    :param function get_key: Extension-specific key function; may return e.g.
        the current Flask request