def METHOD_NAME(
    node: RouteTrieNode,
    method: Method | None,
) -> ASGIHandlerTuple:
    """Retrieve the handler tuple from the node.
    Args:
        node: The trie node to parse.
        method: The scope's method.
    Raises:
        KeyError: If no matching method is found.
    Returns:
        An ASGI Handler tuple.
    """
    if node.is_asgi:
        return node.asgi_handlers["asgi"]
    if method:
        return node.asgi_handlers[method]
    return node.asgi_handlers["websocket"]