class_docstr: An auxiliary class for iterating through a dataset.
docstr: Args:
      transform_filename_to_tensor (Callable): Function to read a data
                  file from path and return a tensor from that file.
      path (str): Path to dataset files. This can be either a path to a
                  directory or a file where input examples are stored.
code: def __init__(
      self, transform_filename_to_tensor: Callable, path: str
  ) -> None:
      r"""
      Args:
          transform_filename_to_tensor (Callable): Function to read a data
                      file from path and return a tensor from that file.
          path (str): Path to dataset files. This can be either a path to a
                      directory or a file where input examples are stored.
      """
      self.file_itr = None
      self.path = path
  
      if os.path.isdir(self.path):
          self.file_itr = glob.glob(self.path + "*")
  
      self.transform_filename_to_tensor = transform_filename_to_tensor
  
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 to create a new CustomIterableDataset object from inherited base classes: IterableDataset with example: obj = CustomIterableDataset(transform_filename_to_tensor, path)