code: def load_datasets(hparams, train_step):
      """Flexibly loads the specified dataset. If a custom loader is
      provided, it will be used. Otherwise, it will default to the
      arrow dataset loader"""
      data_folder = hparams["data_folder"]
      dataset = datasets.load_dataset(
          hparams["dataset"], cache_dir=hparams["data_folder"]
      )
      train_step_name = train_step.get("name", "sentence")
      results = [
          DynamicItemDataset.from_arrow_dataset(
              dataset[f"{train_step_name}_{key}"],
              replacements={"data_root": data_folder},
          )
          for key in DATASET_SPLITS
      ]
      return results
  
imports: from speechbrain.dataio.dataset import FilteredSortedDynamicItemDataset, DynamicItemDataset
  from speechbrain.dataio.sampler import BalancingDataSampler
  from speechbrain.utils.data_utils import undo_padding
  import datasets
  import logging
  import os
  import random
  import speechbrain
  import sys
  from enum import Enum
  from collections import namedtuple
  from hyperpyyaml import load_hyperpyyaml
  from functools import partial
  from speechbrain.utils.distributed import run_on_main
  from speechbrain.utils.pretrained import save_for_pretrained
  from speechbrain.lobes.models.g2p.dataio import enable_eos_bos, grapheme_pipeline, phoneme_pipeline, tokenizer_encode_pipeline, add_bos_eos, get_sequence_key, phonemes_to_label
  from speechbrain.dataio.wer import print_alignments
  from speechbrain.wordemb.util import expand_to_chars
  from io import StringIO
  from speechbrain.utils import hpopt
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: load_datasets(hparams, train_step) and returns: results