async def METHOD_NAME(client: PubSubClient, timeout: float = 3) -> None:
    """
    Shutdown the Websocket client and clear the connections with a specified timeout.
    """
    logger.debug("Disconnecting Websocket client")
    async def wait_for_disconnect() -> None:
        await client.METHOD_NAME()
    try:
        await asyncio.wait_for(wait_for_disconnect(), timeout=timeout)
    except asyncio.TimeoutError as e:
        logger.warning(
            "Disconnecting a PubSubClient has timed out after {}s.", timeout
        )
        raise WebsocketTimeout("PubSubClient disconnect has timed out.") from e