docstr: Utility method that must be explicitly called by the subclass in order to support optional optimization flags.
  This method is the only valid place to access self.cfg prior to DDP training occurs.
  
  The subclass may chose not to support this method, therefore all variables here must be checked via hasattr()
docstr_tok: ["Utility","method","that","must","be","explicitly","called","by","the","subclass","in","order","to","support","optional","optimization","flags",".","This","method","is","the","only","valid","place","to","access","self.cfg","prior","to","DDP","training","occurs",".","The","subclass","may","chose","not","to","support","this","method",",","therefore","all","variables","here","must","be","checked","via","hasattr","(",")"]
code: def setup_optimization_flags(self):
      """
      Utility method that must be explicitly called by the subclass in order to support optional optimization flags.
      This method is the only valid place to access self.cfg prior to DDP training occurs.
  
      The subclass may chose not to support this method, therefore all variables here must be checked via hasattr()
      """
      # Skip update if nan/inf grads appear on any rank.
      self._skip_nan_grad = False
      if "skip_nan_grad" in self._cfg and self._cfg["skip_nan_grad"]:
          self._skip_nan_grad = self._cfg["skip_nan_grad"]
  
imports: from abc import ABC, abstractmethod
  from typing import List, Union
  import hydra
  import torch
  from omegaconf import DictConfig, OmegaConf
  from pytorch_lightning import Trainer
  from nemo.collections.asr.metrics.audio import AudioMetricWrapper
  from nemo.core.classes import ModelPT
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 15 for calling the AudioToAudioModel obj's underlying member method code with example usage: obj.setup_optimization_flags() without return types