async def METHOD_NAME():
    dispatched_value = None
    async def dispatch_func(value: int) -> None:
        nonlocal dispatched_value
        dispatched_value = value
    dispatcher = MessageDispatcher[int, int]()
    dispatcher.listen_to(
        1, dispatch_func, message_filter=lambda message: (message % 2) == 0
    )
    await asyncio.wait_for(asyncio.gather(*dispatcher.dispatch(1, 1)), 5.0)
    assert dispatched_value == None
    await asyncio.wait_for(asyncio.gather(*dispatcher.dispatch(1, 2)), 5.0)
    assert dispatched_value == 2