code: def _get_dataloader(
      dataset_type: str,
      root_dir: Union[str, Path],
      num_speakers: int = 2,
      sample_rate: int = 8000,
      batch_size: int = 6,
      num_workers: int = 4,
      librimix_task: Optional[str] = None,
      librimix_tr_split: Optional[str] = None,
  ) -> Tuple[DataLoader]:
      """Get dataloaders for training, validation, and testing.
  
      Args:
          dataset_type (str): the dataset to use.
          root_dir (str or Path): the root directory of the dataset.
          num_speakers (int, optional): the number of speakers in the mixture. (Default: 2)
          sample_rate (int, optional): the sample rate of the audio. (Default: 8000)
          batch_size (int, optional): the batch size of the dataset. (Default: 6)
          num_workers (int, optional): the number of workers for each dataloader. (Default: 4)
          librimix_task (str or None, optional): the task in LibriMix dataset.
          librimix_tr_split (str or None, optional): the training split in LibriMix dataset.
  
      Returns:
          tuple: (train_loader, valid_loader, eval_loader)
      """
      (
          train_dataset,
          valid_dataset,
          eval_dataset,
      ) = dataset_utils.get_dataset(
          dataset_type,
          root_dir,
          num_speakers,
          sample_rate,
          librimix_task,
          librimix_tr_split,
      )
      train_collate_fn = dataset_utils.get_collate_fn(
          dataset_type,
          mode="train",
          sample_rate=sample_rate,
          duration=3,
      )
  
      test_collate_fn = dataset_utils.get_collate_fn(
          dataset_type, mode="test", sample_rate=sample_rate
      )
  
      train_loader = DataLoader(
          train_dataset,
          batch_size=batch_size,
          shuffle=True,
          collate_fn=train_collate_fn,
          num_workers=num_workers,
          drop_last=True,
      )
      valid_loader = DataLoader(
          valid_dataset,
          batch_size=batch_size,
          collate_fn=test_collate_fn,
          num_workers=num_workers,
          drop_last=True,
      )
      eval_loader = DataLoader(
          eval_dataset,
          batch_size=batch_size,
          collate_fn=test_collate_fn,
          num_workers=num_workers,
      )
      return train_loader, valid_loader, eval_loader
  
imports: from argparse import ArgumentParser
  from pathlib import Path
  from typing import Any, Callable, Dict, List, Mapping, Optional, Tuple, TypedDict, Union
  import torch
  import torchaudio
  from pytorch_lightning import LightningModule, Trainer
  from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint
  from torch import nn
  from torch.optim.lr_scheduler import _LRScheduler
  from torch.utils.data import DataLoader
  from utils import metrics
  from utils.dataset import utils
label_desc: Use image node_id 5 for calling a global function with example usage: _get_dataloader(dataset_type, root_dir, num_speakers, sample_rate, batch_size, num_workers, librimix_task, librimix_tr_split) and returns: train_loader,  valid_loader,  eval_loader