code: def register_config(model_name: str) -> Coqpit:
      """Find the right config for the given model name.
  
      Args:
          model_name (str): Model name.
  
      Raises:
          ModuleNotFoundError: No matching config for the model name.
  
      Returns:
          Coqpit: config class.
      """
      config_class = None
      config_name = model_name + "_config"
  
      # TODO: fix this
      if model_name == "xtts":
          from TTS.tts.configs.xtts_config import XttsConfig
  
          config_class = XttsConfig
      paths = [
          "TTS.tts.configs",
          "TTS.vocoder.configs",
          "TTS.encoder.configs",
          "TTS.vc.configs",
      ]
      for path in paths:
          try:
              config_class = find_module(path, config_name)
          except ModuleNotFoundError:
              pass
      if config_class is None:
          raise ModuleNotFoundError(
              f" [!] Config for {model_name} cannot be found."
          )
      return config_class
  
file_path: TTS/TTS/config/__init__.py
imports: import json
  import os
  import re
  from typing import Dict
  import fsspec
  import yaml
  from coqpit import Coqpit
  from TTS.config.shared_configs import *
  from TTS.utils.generic_utils import find_module
label_desc: Use image node_id 2 for calling a global function with example usage: register_config(model_name) and returns: config_class