code: def setup_loader(
      ap: AudioProcessor, is_val: bool = False, verbose: bool = False
  ):
      if is_val:
          loader = None
      else:
          dataset = MyDataset(
              ap,
              meta_data_eval if is_val else meta_data_train,
              voice_len=1.6,
              num_utter_per_speaker=c.num_utters_per_speaker,
              num_speakers_in_batch=c.num_speakers_in_batch,
              skip_speakers=False,
              storage_size=c.storage["storage_size"],
              sample_from_storage_p=c.storage["sample_from_storage_p"],
              additive_noise=c.storage["additive_noise"],
              verbose=verbose,
          )
          # sampler = DistributedSampler(dataset) if num_gpus > 1 else None
          loader = DataLoader(
              dataset,
              batch_size=c.num_speakers_in_batch,
              shuffle=False,
              num_workers=c.num_loader_workers,
              collate_fn=dataset.collate_fn,
          )
      return loader
  
imports: import argparse
  import os
  import sys
  import time
  import traceback
  import torch
  from torch.utils.data import DataLoader
  from TTS.speaker_encoder.dataset import MyDataset
  from TTS.speaker_encoder.losses import AngleProtoLoss, GE2ELoss
  from TTS.speaker_encoder.model import SpeakerEncoder
  from TTS.speaker_encoder.utils.generic_utils import check_config_speaker_encoder, save_best_model
  from TTS.speaker_encoder.utils.visual import plot_embeddings
  from TTS.tts.datasets.preprocess import load_meta_data
  from TTS.utils.audio import AudioProcessor
  from TTS.utils.generic_utils import count_parameters, create_experiment_folder, get_git_branch, remove_experiment_folder, set_init_dict
  from TTS.utils.io import copy_model_files, load_config
  from TTS.utils.radam import RAdam
  from TTS.utils.tensorboard_logger import TensorboardLogger
  from TTS.utils.training import NoamLR, check_update
label_desc: Use image node_id 1 for calling a global function with example usage: setup_loader(ap, is_val, verbose) and returns: loader