code: def main():
      with contextlib.suppress(FileExistsError):
          os.mkdir(CONFIG_DIR)
  
      common_prefix = os.path.commonprefix((__file__, CONFIG_DIR))
  
      for config_path, config in ALL_CONFIGS.items():
          file_path = os.path.join(CONFIG_DIR, f"{config_path}.rst")
          print(
              "Creating file", os.path.relpath(file_path, common_prefix)
          )
          with PathManager.open(file_path, "w") as config_rst:
              config_rst.write(format_config_rst(config))
  
      for package, subpackages, configs in toctree_files(ALL_CONFIGS):
          file_path = os.path.join(CONFIG_DIR, f"{package}.rst")
          print(
              "Creating file", os.path.relpath(file_path, common_prefix)
          )
          with PathManager.open(file_path, "w") as toctree_file:
              toctree_file.write(
                  format_toctree_rst(package, subpackages, configs)
              )
  
imports: import collections
  import contextlib
  import itertools
  import json
  import os
  import typing
  from pytext.config import ConfigBase, ExportConfig, PyTextConfig
  from pytext.config.component import Registry
  from pytext.config.serialize import config_to_json
  from pytext.utils.file_io import PathManager
  from sphinx.ext.napoleon import GoogleDocstring
  from sphinx.pycode import ModuleAnalyzer
label_desc: Use image node_id 15 for calling a global function with example usage: main() without return types