def METHOD_NAME(monkeypatch):
    f = get_fake_srv_function(monkeypatch)
    async def af(qname, rdtype):
        return f(qname, rdtype)
    monkeypatch.setattr(
        psycopg._dns.async_resolver,  # type: ignore[attr-defined]
        "resolve",
        af,
    )