code: def __init__(
      self,
      root,
      class_map="",
      input_key=None,
  ):
      super().__init__()
  
      self.root = root
      class_to_idx = None
      if class_map:
          class_to_idx = load_class_map(class_map, root)
      find_types = None
      if input_key:
          find_types = input_key.split(";")
      self.samples, self.class_to_idx = find_images_and_targets(
          root,
          class_to_idx=class_to_idx,
          types=find_types,
      )
      if len(self.samples) == 0:
          raise RuntimeError(
              f"Found 0 images in subfolders of {root}. "
              f'Supported image extensions are {", ".join(get_img_extensions())}'
          )
  
file_path: pytorch-image-models/timm/data/readers/reader_image_folder.py
imports: import os
  from typing import Dict, List, Optional, Set, Tuple, Union
  from timm.utils.misc import natural_key
  from .class_map import load_class_map
  from .img_extensions import get_img_extensions
  from .reader import Reader
label_desc: Use image node_id 1 to create a new ReaderImageFolder object from inherited base classes: Reader with example: obj = ReaderImageFolder(root, class_map, input_key)