code: def update_model_config_to_support_adapter(config) -> DictConfig:
      with open_dict(config):
          enc_adapter_metadata = adapter_mixins.get_registered_adapter(
              config.input_fft._target_
          )
          if enc_adapter_metadata is not None:
              config.input_fft._target_ = (
                  enc_adapter_metadata.adapter_class_path
              )
  
          dec_adapter_metadata = adapter_mixins.get_registered_adapter(
              config.output_fft._target_
          )
          if dec_adapter_metadata is not None:
              config.output_fft._target_ = (
                  dec_adapter_metadata.adapter_class_path
              )
  
          pitch_predictor_adapter_metadata = (
              adapter_mixins.get_registered_adapter(
                  config.pitch_predictor._target_
              )
          )
          if pitch_predictor_adapter_metadata is not None:
              config.pitch_predictor._target_ = (
                  pitch_predictor_adapter_metadata.adapter_class_path
              )
  
          duration_predictor_adapter_metadata = (
              adapter_mixins.get_registered_adapter(
                  config.duration_predictor._target_
              )
          )
          if duration_predictor_adapter_metadata is not None:
              config.duration_predictor._target_ = (
                  duration_predictor_adapter_metadata.adapter_class_path
              )
  
          aligner_adapter_metadata = (
              adapter_mixins.get_registered_adapter(
                  config.alignment_module._target_
              )
          )
          if aligner_adapter_metadata is not None:
              config.alignment_module._target_ = (
                  aligner_adapter_metadata.adapter_class_path
              )
  
      return config
  
file_path: NeMo/examples/tts/fastpitch_finetune_adapters.py
imports: import os
  from dataclasses import is_dataclass
  import pytorch_lightning
  from omegaconf import DictConfig, OmegaConf, open_dict
  from nemo.collections.common.callbacks import LogEpochTimeCallback
  from nemo.collections.tts.models import FastPitchModel
  from nemo.core import adapter_mixins
  from nemo.core.config import hydra_runner
  from nemo.utils import logging
  from nemo.utils.exp_manager import exp_manager
label_desc: Use image node_id 1 for calling a global function with example usage: update_model_config_to_support_adapter(config) and returns: config