code: def setup_loader(ap, is_val=False, verbose=False):
      if is_val and not c.run_eval:
          loader = None
      else:
          dataset = WaveRNNDataset(
              ap=ap,
              items=eval_data if is_val else train_data,
              seq_len=c.seq_len,
              hop_len=ap.hop_length,
              pad=c.padding,
              mode=c.mode,
              mulaw=c.mulaw,
              is_training=not is_val,
              verbose=verbose,
          )
          # sampler = DistributedSampler(dataset) if num_gpus > 1 else None
          loader = DataLoader(
              dataset,
              shuffle=True,
              collate_fn=dataset.collate,
              batch_size=c.batch_size,
              num_workers=c.num_val_loader_workers
              if is_val
              else c.num_loader_workers,
              pin_memory=True,
          )
      return loader
  
imports: import argparse
  import os
  import sys
  import traceback
  import time
  import glob
  import random
  import torch
  from torch.utils.data import DataLoader
  from TTS.tts.utils.visual import plot_spectrogram
  from TTS.utils.audio import AudioProcessor
  from TTS.utils.radam import RAdam
  from TTS.utils.io import copy_model_files, load_config
  from TTS.utils.training import setup_torch_training_env
  from TTS.utils.console_logger import ConsoleLogger
  from TTS.utils.tensorboard_logger import TensorboardLogger
  from TTS.utils.generic_utils import KeepAverage, count_parameters, create_experiment_folder, get_git_branch, remove_experiment_folder, set_init_dict
  from TTS.vocoder.datasets.wavernn_dataset import WaveRNNDataset
  from TTS.vocoder.datasets.preprocess import load_wav_data, load_wav_feat_data
  from TTS.vocoder.utils.distribution import discretized_mix_logistic_loss, gaussian_loss
  from TTS.vocoder.utils.generic_utils import setup_wavernn
  from TTS.vocoder.utils.io import save_best_model, save_checkpoint
label_desc: Use image node_id 1 for calling a global function with example usage: setup_loader(ap, is_val, verbose) and returns: loader