class_docstr: Dataset class for the MS COCO Object Detection using Single Shot Object Detector (SSD).
  
  Args:
      opts: Command-line arguments
docstr: Returns 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` and `targets` as keys corresponding to input and labels of
      a sample, respectively.
  
  Shapes:
      The shape of values in output dictionary, output_data, are as follows:
  
      output_data["samples"]["image"]: Shape is [Channels, Height, Width]
      output_data["targets"]["box_labels"]: Shape is [Num of matched boxes]
      output_data["targets"]["box_coordinates"]: Shape is [Num of matched boxes, 4]
      output_data["targets"]["image_id"]: Shape is [1]
      output_data["targets"]["image_width"]: Shape is [1]
      output_data["targets"]["image_height"]: Shape is [1]
docstr_tok: ["Returns","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","`","and","`","targets","`","as","keys","corresponding","to","input","and","labels","of","a","sample",",","respectively",".","Shapes",":","The","shape","of","values","in","output","dictionary",",","output_data",",","are","as","follows",":","output_data","[","``","samples","''","]","[","``","image","''","]",":","Shape","is","[","Channels",",","Height",",","Width","]","output_data","[","``","targets","''","]","[","``","box_labels","''","]",":","Shape","is","[","Num","of","matched","boxes","]","output_data","[","``","targets","''","]","[","``","box_coordinates","''","]",":","Shape","is","[","Num","of","matched","boxes",",","4","]","output_data","[","``","targets","''","]","[","``","image_id","''","]",":","Shape","is","[","1","]","output_data","[","``","targets","''","]","[","``","image_width","''","]",":","Shape","is","[","1","]","output_data","[","``","targets","''","]","[","``","image_height","''","]",":","Shape","is","[","1","]"]
code: def __getitem__(
      self, sample_size_and_index: Tuple[int, int, int], *args, **kwargs
  ) -> Mapping[str, Union[Tensor, Mapping[str, Tensor]]]:
      """Returns 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` and `targets` as keys corresponding to input and labels of
          a sample, respectively.
  
      Shapes:
          The shape of values in output dictionary, output_data, are as follows:
  
          output_data["samples"]["image"]: Shape is [Channels, Height, Width]
          output_data["targets"]["box_labels"]: Shape is [Num of matched boxes]
          output_data["targets"]["box_coordinates"]: Shape is [Num of matched boxes, 4]
          output_data["targets"]["image_id"]: Shape is [1]
          output_data["targets"]["image_width"]: Shape is [1]
          output_data["targets"]["image_height"]: Shape is [1]
  
      """
      crop_size_h, crop_size_w, img_index = sample_size_and_index
  
      transform_fn = self.get_augmentation_transforms(
          size=(crop_size_h, crop_size_w)
      )
  
      image_id = self.ids[img_index]
  
      image, img_fname = self.get_image(image_id=image_id)
      im_width, im_height = image.size
      boxes, labels, _ = self.get_boxes_and_labels(
          image_id=image_id,
          image_width=im_width,
          image_height=im_height,
      )
  
      data = {
          "image": image,
          "box_labels": labels,
          "box_coordinates": boxes,
      }
  
      data = transform_fn(data)
  
      # convert to priors
      anchors = self.generate_anchors(
          height=crop_size_h, width=crop_size_w
      )
  
      gt_coordinates, gt_labels = self.match_prior(
          gt_boxes=data["box_coordinates"],
          gt_labels=data["box_labels"],
          anchors=anchors,
      )
  
      output_data = {
          "samples": {"image": data.pop("image")},
          "targets": {
              "box_labels": gt_labels,
              "box_coordinates": gt_coordinates,
              "image_id": torch.tensor(image_id),
              "image_width": torch.tensor(im_width),
              "image_height": torch.tensor(im_height),
          },
      }
  
      return output_data
  
imports: import argparse
  import math
  from typing import List, Mapping, Tuple, Union
  import torch
  from torch import Tensor
  from cvnets.anchor_generator import build_anchor_generator
  from cvnets.matcher_det import build_matcher
  from data.collate_fns import COLLATE_FN_REGISTRY
  from data.datasets import DATASET_REGISTRY
  from data.datasets.detection.coco_base import COCODetection
  from data.transforms import image_pil
  from data.transforms.common import Compose
  from utils import logger
label_desc: Use image node_id 5 for calling the COCODetectionSSD obj's underlying member method code with example usage: obj.__getitem__(sample_size_and_index) and returns: output_data