class_docstr: Taken and adapted from torch.utils.data.datapipes.iter.LoadFilesFromDisk
  
  TODO:
  Merge this back or replace this with something in core Datapipes lib
class_docstr_tok: ["Taken","and","adapted","from","torch.utils.data.datapipes.iter.LoadFilesFromDisk","TODO",":","Merge","this","back","or","replace","this","with","something","in","core","Datapipes","lib"]
code: def __iter__(self):
      if self.mode in ("b", "t"):
          self.mode = "r" + self.mode
      for pathname in self.datapipe:
          if not isinstance(pathname, str):
              raise TypeError(
                  "Expected string type for pathname, but got {}".format(
                      type(pathname)
                  )
              )
          yield (
              pathname,
              self.path_manager.open(
                  pathname, self.mode, **self.open_kw
              ),
          )
  
imports: import csv
  import math
  import random
  from dataclasses import dataclass
  from functools import partial
  from io import IOBase
  from typing import Any, Callable, Iterable, Iterator, List, Sequence, Tuple, TypeVar
  import torch
  from iopath.common.file_io import PathManager, PathManagerFactory
  from torch.utils.data import functional_datapipe, get_worker_info, IterDataPipe
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
  from torchrec.streamable import Pipelineable
label_desc: Use image node_id 2 for calling the LoadFiles obj's underlying member method code with example usage: obj.__iter__() without return types