class_docstr: Generic dataset for images that can deal with PIL images, numpy arrays,
  or torch tensors.
code: def __getitem__(self, idx):
      if torch.is_tensor(idx):
          idx = idx.tolist()
  
      image = self.images[idx]
      label = self.labels[idx]
  
      if self.transform:
          image = self.transform(image)
  
      return image, label
  
imports: import numpy
  import torch
  from torch.utils.data import Dataset
  from torchvision import datasets, transforms
  from typing import List, Union
  from pathlib import Path
  from PIL import Image
label_desc: Use image node_id 3 for calling the ImageDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: image,  label