def METHOD_NAME(monkeypatch, request):
    entry = getattr(request, 'param', None)
    if entry is not None:
        hostname, ipaddrlist = entry
        def impl(addr):
            if addr not in ipaddrlist:
                raise socket.herror()
            return (hostname, [], ipaddrlist)
        monkeypatch.setattr('vdsm.sslutils.socket.gethostbyaddr', impl)