class_docstr: GTSRB Dataset
  
  homepage="https://benchmark.ini.rub.de"
class_docstr_tok: ["GTSRB","Dataset","homepage=","''","https",":","\/\/benchmark.ini.rub.de","''"]
code: def _prepare_sample(
      self, data: Tuple[Tuple[str, Any], Dict[str, Any]]
  ) -> Dict[str, Any]:
      (path, buffer), csv_info = data
      label = int(csv_info["ClassId"])
  
      bounding_boxes = BoundingBoxes(
          [
              int(csv_info[k])
              for k in ("Roi.X1", "Roi.Y1", "Roi.X2", "Roi.Y2")
          ],
          format="xyxy",
          spatial_size=(
              int(csv_info["Height"]),
              int(csv_info["Width"]),
          ),
      )
  
      return {
          "path": path,
          "image": EncodedImage.from_file(buffer),
          "label": Label(label, categories=self._categories),
          "bounding_boxes": bounding_boxes,
      }
  
file_path: vision/torchvision/prototype/datasets/_builtin/gtsrb.py
imports: import pathlib
  from typing import Any, Dict, List, Optional, Tuple, Union
  from torchdata.datapipes.iter import CSVDictParser, Demultiplexer, Filter, IterDataPipe, Mapper, Zipper
  from torchvision.prototype.datasets.utils import Dataset, EncodedImage, HttpResource, OnlineResource
  from torchvision.prototype.datasets.utils._internal import hint_sharding, hint_shuffling, INFINITE_BUFFER_SIZE, path_comparator
  from torchvision.prototype.tv_tensors import Label
  from torchvision.tv_tensors import BoundingBoxes
  from .._api import register_dataset, register_info
label_desc: Use image node_id 4 for calling the GTSRB obj's underlying member method code with example usage: obj._prepare_sample(data) and returns: dict