def METHOD_NAME(
    app: Litestar,
    mount_routes: dict[str, RouteTrieNode],
    plain_routes: set[str],
    root_node: RouteTrieNode,
    route: HTTPRoute | WebSocketRoute | ASGIRoute,
) -> RouteTrieNode:
    """Add a new route path (e.g. '/foo/bar/{param:int}') into the route_map tree.
    Inserts non-parameter paths ('plain routes') off the tree's root
    node. For paths containing parameters, splits the path on '/' and
    nests each path segment under the previous segment's node (see
    prefix tree / trie).
    Args:
        app: The Litestar app instance.
        mount_routes: A dictionary mapping static routes to trie nodes.
        plain_routes: A set of routes that do not have path parameters.
        root_node: The root trie node.
        route: The route that is being added.
    Returns:
        A RouteTrieNode instance.
    """
    current_node = root_node
    has_path_parameters = bool(route.path_parameters)
    if (route_handler := getattr(route, "route_handler", None)) and getattr(route_handler, "is_mount", False):
        current_node = add_mount_route(
            current_node=current_node,
            mount_routes=mount_routes,
            root_node=root_node,
            route=cast("ASGIRoute", route),
        )
    elif not has_path_parameters:
        plain_routes.add(route.path)
        if route.path not in root_node.children:
            current_node.children[route.path] = create_node()
        current_node = root_node.children[route.path]
    else:
        for component in route.path_components:
            if isinstance(component, PathParameterDefinition):
                current_node.is_path_param_node = True
                next_node_key: type[PathParameterSentinel] | str = PathParameterSentinel
            else:
                next_node_key = component
            if next_node_key not in current_node.children:
                current_node.children[next_node_key] = create_node()
            current_node.child_keys = set(current_node.children.keys())
            current_node = current_node.children[next_node_key]
            if isinstance(component, PathParameterDefinition) and component.type is Path:
                current_node.is_path_type = True
    configure_node(route=route, app=app, node=current_node)
    return current_node