async def METHOD_NAME(event_loop, udns_server):
    async def _scan(timeout=1, identifier=None, protocol=None):
        with fake_udns.stub_multicast(udns_server, event_loop):
            return await pyatv.scan(
                event_loop, identifier=identifier, protocol=protocol, timeout=timeout
            )
    yield _scan