human
I wrote the below code

    prv_getaddrinfo = socket.getaddrinfo
    dns_cache = {}
    def new_getaddrinfo(*args):
        logging.getLogger('DNS').debug(('resolving    domain    name    %s' % repr(args)))
        _args = list(args)
        ip = nginx_proxy_dns_resolver(args[0])
        if (ip is None):
            ip = docker_container_dns_resolver(args[0])
        if (ip is not None):
            _args[0] = ip
        try:
            return dns_cache[tuple(_args)]
        except KeyError:
            res = prv_getaddrinfo(*_args)
            dns_cache[tuple(_args)] = res
            return res
    socket.getaddrinfo = new_getaddrinfo
    return prv_getaddrinfo

What's a good function header?

Here's a good function header?
assistant
#Here's a good function header.

def monkey_patch_urllib_dns_resolver():