code: def __init__(self, config=None):
      self.config = config or OmegaConf.create()
      if not type(self.config) == dict:
          self.config = OmegaConf.to_container(self.config)
      self.keep_orig_class_label = self.config.get(
          "keep_orig_class_label", False
      )
      self.process_images = True  # if False we skip loading & processing images and self.data contains filepaths
      self._prepare()
      self._prepare_synset_to_human()
      self._prepare_idx_to_synset()
      self._prepare_human_to_integer_label()
      self._load()
  
imports: import glob
  import os
  import pickle
  import shutil
  import tarfile
  from functools import partial
  import albumentations
  import cv2
  import numpy
  import PIL
  import taming.data.utils
  import torchvision.transforms.functional
  import yaml
  from ldm.modules.image_degradation import degradation_fn_bsr, degradation_fn_bsr_light
  from omegaconf import OmegaConf
  from PIL import Image
  from taming.data.imagenet import ImagePaths, download, give_synsets_from_indices, retrieve, str_to_indices
  from torch.utils.data import Dataset, Subset
  from tqdm import tqdm
label_desc: Use image node_id 1 to create a new ImageNetBase object from inherited base classes: Dataset with example: obj = ImageNetBase(config)