class_docstr: Food 101 dataset
  homepage="https://data.vision.ee.ethz.ch/cvl/datasets_extra/food-101",
class_docstr_tok: ["Food","101","dataset","homepage=","''","https",":","\/\/data.vision.ee.ethz.ch\/cvl\/datasets_extra\/food-101","''",","]
code: def _prepare_sample(
      self, data: Tuple[str, Tuple[str, BinaryIO]]
  ) -> Dict[str, Any]:
      id, (path, buffer) = data
      return dict(
          label=Label.from_category(
              id.split("/", 1)[0], categories=self._categories
          ),
          path=path,
          image=EncodedImage.from_file(buffer),
      )
  
file_path: vision/torchvision/prototype/datasets/_builtin/food101.py
imports: from pathlib import Path
  from typing import Any, BinaryIO, Dict, List, Optional, Tuple, Union
  from torchdata.datapipes.iter import Demultiplexer, Filter, IterDataPipe, IterKeyZipper, LineReader, Mapper
  from torchvision.prototype.datasets.utils import Dataset, EncodedImage, HttpResource, OnlineResource
  from torchvision.prototype.datasets.utils._internal import getitem, hint_sharding, hint_shuffling, INFINITE_BUFFER_SIZE, path_comparator, read_categories_file
  from torchvision.prototype.tv_tensors import Label
  from .._api import register_dataset, register_info
label_desc: Use image node_id 4 for calling the Food101 obj's underlying member method code with example usage: obj._prepare_sample(data) and returns: dict