code: def dataset_to_dataloader(
      dataset: Dataset, batch_size: int = 64
  ) -> DataLoader:
      r"""
      An auxiliary function that creates torch DataLoader from torch Dataset
      using input `batch_size`.
  
      Args:
          dataset (Dataset): A torch dataset that allows to iterate over
              the batches of examples.
          batch_size (int, optional): Batch size of for each tensor in the
              iteration.
  
      Returns:
          dataloader_iter (DataLoader): a DataLoader for data iteration.
      """
  
      return DataLoader(dataset, batch_size=batch_size)
  
file_path: captum/captum/concept/_utils/data_iterator.py
imports: import glob
  import os
  from typing import Callable, Iterator
  from torch import Tensor
  from torch.utils.data import DataLoader, Dataset, IterableDataset
label_desc: Use image node_id 1 for calling a global function with example usage: dataset_to_dataloader(dataset, batch_size) and returns: DataLoader