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: Return the sample corresponding to the input sample index.
  
  Returned sample is transformed into the size specified by the input.
  
  Args:
      sample_size_and_index: Tuple of the form (crop_size_h, crop_size_w,
          sample_index)
  
  Returns:
      A dictionary with `samples`, `sample_id` and `targets` as keys corresponding
      to input, index and label of a sample, respectively.
  
  Shapes:
      The output data dictionary contains three keys (samples, sample_id, and
      target). The values of these keys has the following shapes:
          data["samples"]: Shape is [Channels, Height, Width]
          data["sample_id"]: Shape is 1
          data["targets"]: Shape is 1
code: def __getitem__(
      self, sample_size_and_index: Tuple[int, int, int]
  ) -> Dict[str, Any]:
      """Return the sample corresponding to the input sample index.
  
      Returned sample is transformed into the size specified by the input.
  
      Args:
          sample_size_and_index: Tuple of the form (crop_size_h, crop_size_w,
              sample_index)
  
      Returns:
          A dictionary with `samples`, `sample_id` and `targets` as keys corresponding
          to input, index and label of a sample, respectively.
  
      Shapes:
          The output data dictionary contains three keys (samples, sample_id, and
          target). The values of these keys has the following shapes:
              data["samples"]: Shape is [Channels, Height, Width]
              data["sample_id"]: Shape is 1
              data["targets"]: Shape is 1
      """
      data = BaseImageClassificationDataset.__getitem__(
          self, sample_size_and_index
      )
      data["targets"] = self.class_id_to_imagenet_class_id(
          data["targets"]
      )
  
      return data
  
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 4 for calling the BaseImageNetShiftDataset obj's underlying member method code with example usage: obj.__getitem__(sample_size_and_index) and returns: data