code: def __init__(self, ds, transform_fn):
      assert isinstance(ds, Dataset)
      assert callable(transform_fn)
      self.ds = ds
      self.transform_fn = transform_fn
  
imports: import cv2
  import numpy
  import torch
  from PIL import Image
  from torch.utils.data import Dataset
  from torch.utils.data.dataset import Subset
  from torchvision.datasets.sbd import SBDataset
  from torchvision.datasets.voc import VOCSegmentation
  import ignite.distributed
  from ignite.utils import convert_tensor
label_desc: Use image node_id 1 to create a new TransformedDataset object from inherited base classes: Dataset with example: obj = TransformedDataset(ds, transform_fn)