class_docstr: ImageNet Distribution Shift Dataset.
  
  This base class supports ImageNet out-of-distribution datasets. The class names for
  datasets are a subset of ImageNet. The `__getitem__` method projects the
  labels to the classes of ImageNet to allow zero-shot evaluation.
  
  Args:
      opts: An argparse.Namespace instance.
docstr: Initialize BaseImageNetShiftDataset.
code: def __init__(
      self,
      opts: argparse.Namespace,
      *args,
      **kwargs,
  ) -> None:
      """Initialize BaseImageNetShiftDataset."""
      BaseImageClassificationDataset.__init__(
          self,
          opts=opts,
          *args,
          **kwargs,
      )
      # The class ids are converted to their equivalent ImageNet class ids
      # We manually set the n_classes and overwrite the n_classes set by
      # ImageFolder
      self.n_classes = 1000
      # TODO: remove setattr when BaseImageClassificationDataset removes it
      setattr(opts, "model.classification.n_classes", self.n_classes)
  
      self.post_init_checks()
  
file_path: ml-cvnets/data/datasets/classification/base_imagenet_shift_dataset.py
imports: import argparse
  from typing import Any, Dict, Tuple
  from data.datasets.classification.base_image_classification_dataset import BaseImageClassificationDataset
label_desc: Use image node_id 1 to create a new BaseImageNetShiftDataset object from inherited base classes: BaseImageClassificationDataset with example: obj = BaseImageNetShiftDataset(opts)