def METHOD_NAME(
    self,
    retriever_mode: Union[str, TreeRetrieverMode] = TreeRetrieverMode.SELECT_LEAF,
    **kwargs: Any,
) -> BaseRetriever:
    # NOTE: lazy import
    from llama_index.indices.tree.all_leaf_retriever import TreeAllLeafRetriever
    from llama_index.indices.tree.select_leaf_embedding_retriever import (
        TreeSelectLeafEmbeddingRetriever,
    )
    from llama_index.indices.tree.select_leaf_retriever import (
        TreeSelectLeafRetriever,
    )
    from llama_index.indices.tree.tree_root_retriever import TreeRootRetriever
    self._validate_build_tree_required(TreeRetrieverMode(retriever_mode))
    if retriever_mode == TreeRetrieverMode.SELECT_LEAF:
        return TreeSelectLeafRetriever(self, **kwargs)
    elif retriever_mode == TreeRetrieverMode.SELECT_LEAF_EMBEDDING:
        return TreeSelectLeafEmbeddingRetriever(self, **kwargs)
    elif retriever_mode == TreeRetrieverMode.ROOT:
        return TreeRootRetriever(self, **kwargs)
    elif retriever_mode == TreeRetrieverMode.ALL_LEAF:
        return TreeAllLeafRetriever(self, **kwargs)
    else:
        raise ValueError(f"Unknown retriever mode: {retriever_mode}")