code: def configure_optimizers(self):
      optim_config = self._cfg.optim.copy()
      OmegaConf.set_struct(optim_config, False)
      sched_config = optim_config.pop("sched", None)
      OmegaConf.set_struct(optim_config, True)
  
      optim_g = instantiate(
          optim_config,
          params=self.net_g.parameters(),
      )
      optim_d = instantiate(
          optim_config,
          params=self.net_d.parameters(),
      )
  
      if sched_config is not None:
          if sched_config.name == "ExponentialLR":
              scheduler_d = torch.optim.lr_scheduler.ExponentialLR(
                  optim_d, gamma=sched_config.lr_decay
              )
              scheduler_g = torch.optim.lr_scheduler.ExponentialLR(
                  optim_g, gamma=sched_config.lr_decay
              )
          elif sched_config.name == "CosineAnnealing":
              scheduler_g = CosineAnnealing(
                  optimizer=optim_g,
                  max_steps=sched_config.max_steps,
                  min_lr=sched_config.min_lr,
              )
              scheduler_d = CosineAnnealing(
                  optimizer=optim_d,
                  max_steps=sched_config.max_steps,
                  min_lr=sched_config.min_lr,
              )
          else:
              raise ValueError("Unknown optimizer.")
  
          scheduler_g_dict = {
              "scheduler": scheduler_g,
              "interval": "step",
          }
          scheduler_d_dict = {
              "scheduler": scheduler_d,
              "interval": "step",
          }
          return [optim_g, optim_d], [
              scheduler_g_dict,
              scheduler_d_dict,
          ]
      else:
          return [optim_g, optim_d]
  
imports: import contextlib
  import omegaconf
  import torch
  from hydra.utils import instantiate
  from omegaconf import DictConfig, OmegaConf
  from pytorch_lightning import Trainer
  from pytorch_lightning.loggers import WandbLogger
  from torch.cuda.amp import autocast
  from torch.nn import functional
  from nemo.collections.tts.data.dataset import DistributedBucketSampler
  from nemo.collections.tts.losses.vits_losses import DiscriminatorLoss, FeatureMatchingLoss, GeneratorLoss, KlLoss
  from nemo.collections.tts.models.base import TextToWaveform
  from nemo.collections.tts.modules.vits_modules import MultiPeriodDiscriminator
  from nemo.collections.tts.parts.utils.helpers import clip_grad_value_, g2p_backward_compatible_support, plot_spectrogram_to_numpy, slice_segments
  from nemo.collections.tts.torch.tts_data_types import SpeakerID
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.neural_types.elements import AudioSignal, FloatType, Index, IntType, TokenIndex
  from nemo.core.neural_types.neural_type import NeuralType
  from nemo.core.optim.lr_scheduler import CosineAnnealing
  from nemo.utils import logging, model_utils
  from nemo.utils.decorators.experimental import experimental
label_desc: Use image node_id 5 for calling the VitsModel obj's underlying member method code with example usage: obj.configure_optimizers() and returns: list,  list, list