code: def get_collate_fn(dataset_type, mode, sample_rate=None, duration=4):
      assert mode in ["train", "test"]
      if dataset_type in ["wsj0mix", "librimix"]:
          if mode == "train":
              if sample_rate is None:
                  raise ValueError("sample_rate is not given.")
              return partial(
                  collate_fn_wsj0mix_train,
                  sample_rate=sample_rate,
                  duration=duration,
              )
          return partial(
              collate_fn_wsj0mix_test, sample_rate=sample_rate
          )
      raise ValueError(f"Unexpected dataset: {dataset_type}")
  
file_path: audio/examples/source_separation/utils/dataset/utils.py
imports: from collections import namedtuple
  from functools import partial
  from typing import List
  import torch
  from torchaudio.datasets import LibriMix
  from .None import wsj0mix
label_desc: Use image node_id 5 for calling a global function with example usage: get_collate_fn(dataset_type, mode, sample_rate, duration) and returns: partial, partial