code: def __init__(
      self,
      root,
      reader=None,
      split="train",
      class_map=None,
      load_bytes=False,
      input_img_mode="RGB",
      transform=None,
      target_transform=None,
  ):
      if reader is None or isinstance(reader, str):
          reader = create_reader(
              reader or "", root=root, split=split, class_map=class_map
          )
      self.reader = reader
      self.load_bytes = load_bytes
      self.input_img_mode = input_img_mode
      self.transform = transform
      self.target_transform = target_transform
      self._consecutive_errors = 0
  
imports: import io
  import logging
  from typing import Optional
  import torch
  import torch.utils.data
  from PIL import Image
  from .readers import create_reader
label_desc: Use image node_id 1 to create a new ImageDataset object from inherited base classes: data with example: obj = ImageDataset(root, reader, split, class_map, load_bytes, input_img_mode, transform, target_transform)