code: def load_sample(self, sample: Any) -> Mapping[str, Any]:
      if isinstance(sample, Data):
          sample = (sample, sample.y)
      sample = to_sample(sample)
      if DataKeys.TARGET in sample:
          sample[DataKeys.TARGET] = self.format_target(
              sample[DataKeys.TARGET]
          )
      return sample
  
file_path: lightning-flash/src/flash/graph/classification/input.py
imports: from typing import Any, Dict, Mapping, Optional
  from torch.utils.data import Dataset
  from flash.core.data.io.classification_input import ClassificationInputMixin
  from flash.core.data.io.input import DataKeys, Input
  from flash.core.data.utilities.classification import TargetFormatter
  from flash.core.data.utilities.samples import to_sample
  from flash.core.utilities.imports import _TOPIC_GRAPH_AVAILABLE, requires
label_desc: Use image node_id 2 for calling the GraphClassificationDatasetInput obj's underlying member method code with example usage: obj.load_sample(sample) and returns: sample