class_docstr: UnivNet model (https://arxiv.org/abs/2106.07889) that is used to generate audio from mel spectrogram.
class_docstr_tok: ["UnivNet","model","(","https",":","\/\/arxiv.org\/abs\/2106.07889",")","that","is","used","to","generate","audio","from","mel","spectrogram","."]
code: def __setup_dataloader_from_config(
      self, cfg, shuffle_should_be: bool = True, name: str = "train"
  ):
      if "dataset" not in cfg or not isinstance(
          cfg.dataset, DictConfig
      ):
          raise ValueError(f"No dataset for {name}")
      if "dataloader_params" not in cfg or not isinstance(
          cfg.dataloader_params, DictConfig
      ):
          raise ValueError(f"No dataloder_params for {name}")
      if shuffle_should_be:
          if "shuffle" not in cfg.dataloader_params:
              logging.warning(
                  f"Shuffle should be set to True for {self}'s {name} dataloader but was not found in its "
                  "config. Manually setting to True"
              )
              with open_dict(cfg["dataloader_params"]):
                  cfg.dataloader_params.shuffle = True
          elif not cfg.dataloader_params.shuffle:
              logging.error(
                  f"The {name} dataloader for {self} has shuffle set to False!!!"
              )
      elif not shuffle_should_be and cfg.dataloader_params.shuffle:
          logging.error(
              f"The {name} dataloader for {self} has shuffle set to True!!!"
          )
  
      dataset = instantiate(cfg.dataset)
      return torch.utils.data.DataLoader(
          dataset,
          collate_fn=dataset.collate_fn,
          **cfg.dataloader_params,
      )
  
imports: import itertools
  from typing import Dict
  import torch
  import torch.nn.functional
  from hydra.utils import instantiate
  from omegaconf import DictConfig, OmegaConf, open_dict
  from pytorch_lightning.loggers.wandb import WandbLogger
  from nemo.collections.tts.losses.hifigan_losses import DiscriminatorLoss, GeneratorLoss
  from nemo.collections.tts.losses.stftlosses import MultiResolutionSTFTLoss
  from nemo.collections.tts.models.base import Vocoder
  from nemo.collections.tts.modules.univnet_modules import MultiPeriodDiscriminator, MultiResolutionDiscriminator
  from nemo.collections.tts.parts.utils.helpers import get_batch_size, get_num_workers, plot_spectrogram_to_numpy
  from nemo.core import Exportable
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.neural_types.elements import AudioSignal, MelSpectrogramType
  from nemo.core.neural_types.neural_type import NeuralType
  from nemo.core.optim.lr_scheduler import compute_max_steps, prepare_lr_scheduler
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 10 for calling the UnivNetModel obj's underlying member method code with example usage: obj.__setup_dataloader_from_config(cfg, shuffle_should_be, name) and returns: torch