async def METHOD_NAME(message_type):
    """The client delete the listener"""
    async def server_node(ep):
        await _shutdown_send(ep, message_type)
        await _shutdown_send(ep, message_type)
    listener = ucp.create_listener(
        server_node,
    )
    ep = await ucp.create_endpoint(
        ucp.get_address(),
        listener.port,
    )
    await _shutdown_recv(ep, message_type)
    assert listener.closed() is False
    del listener
    await _shutdown_recv(ep, message_type)