code: def load_config(config_path: str) -> AttrDict:
      """Load config files and discard comments
  
      Args:
          config_path (str): path to config file.
      """
      config = AttrDict()
  
      ext = os.path.splitext(config_path)[1]
      if ext in (".yml", ".yaml"):
          with open(config_path, "r") as f:
              data = yaml.safe_load(f)
      else:
          data = read_json_with_comments(config_path)
      config.update(data)
      return config
  
file_path: TTS/TTS/utils/io.py
imports: import os
  import re
  import json
  import yaml
  import pickle
  from shutil import copyfile
label_desc: Use image node_id 2 for calling a global function with example usage: load_config(config_path) and returns: config