class_docstr: FastPitch model (https://arxiv.org/abs/2006.06873) that is used to generate mel spectrogram from text.
class_docstr_tok: ["FastPitch","model","(","https",":","\/\/arxiv.org\/abs\/2006.06873",")","that","is","used","to","generate","mel","spectrogram","from","text","."]
code: def tb_logger(self):
      if self._tb_logger is None:
          if self.logger is None and self.logger.experiment is None:
              return None
          tb_logger = self.logger.experiment
          for logger in self.trainer.loggers:
              if isinstance(logger, TensorBoardLogger):
                  tb_logger = logger.experiment
                  break
          self._tb_logger = tb_logger
      return self._tb_logger
  
imports: import contextlib
  from dataclasses import dataclass, field
  from pathlib import Path
  from typing import List, Optional
  import torch
  from hydra.utils import instantiate
  from omegaconf import DictConfig, OmegaConf, open_dict
  from pytorch_lightning import Trainer
  from pytorch_lightning.loggers import TensorBoardLogger
  from nemo.collections.common.parts.preprocessing import parsers
  from nemo.collections.tts.losses.aligner_loss import BinLoss, ForwardSumLoss
  from nemo.collections.tts.losses.fastpitchloss import DurationLoss, EnergyLoss, MelLoss, PitchLoss
  from nemo.collections.tts.models.base import SpectrogramGenerator
  from nemo.collections.tts.modules.fastpitch import FastPitchModule
  from nemo.collections.tts.parts.mixins import FastPitchAdapterModelMixin
  from nemo.collections.tts.parts.utils.callbacks import LoggingCallback
  from nemo.collections.tts.parts.utils.helpers import batch_from_ragged, g2p_backward_compatible_support, plot_alignment_to_numpy, plot_spectrogram_to_numpy, process_batch, sample_tts_input
  from nemo.core.classes import Exportable
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.neural_types.elements import Index, LengthsType, MelSpectrogramType, ProbsType, RegressionValuesType, TokenDurationType, TokenIndex, TokenLogDurationType
  from nemo.core.neural_types.neural_type import NeuralType
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 5 for calling the FastPitchModel obj's underlying member method code with example usage: obj.tb_logger() and returns: self, None