code: def _build_configs_tree() -> Struct:
      root = Path(__file__).resolve().parent
  
      tree = {}
  
      for config in root.glob("**/*.json"):
          leaf = tree
          for part in config.relative_to(root).parent.parts:
              if part not in leaf:
                  leaf[part] = {}
              leaf = leaf[part]
          leaf[config.stem] = config
  
      return Struct(tree)
  
file_path: DeepPavlov/deeppavlov/configs/__init__.py
imports: from pathlib import Path
  from typing import Iterator, Dict, Union, Iterable
label_desc: Use image node_id 1 for calling a global function with example usage: _build_configs_tree() and returns: Struct