class_docstr: Used to create an output widget for showing datasets. Used to render the examples
  box.
  Preprocessing: passes the selected sample either as a {list} of data (if type="value") or as an {int} index (if type="index")
  Postprocessing: expects a {list} of {lists} corresponding to the dataset data.
code: def preprocess(self, payload: int) -> int | list[list] | None:
      if self.type == "index":
          return payload
      elif self.type == "values":
          return self.samples[payload]
  
file_path: gradio/gradio/components/dataset.py
imports: from __future__ import annotations
  from typing import Any, Literal
  from gradio_client.documentation import document, set_documentation_group
  from gradio import processing_utils
  from gradio.components.base import Component, get_component_instance
  from gradio.events import Events
label_desc: Use image node_id 4 for calling the Dataset obj's underlying member method code with example usage: obj.preprocess(payload) and returns: payload, self