code: def _get_num_features(sample: Dict[str, Any]) -> Optional[int]:
      """Get the number of features per node in the given dataset."""
      data = sample[DataKeys.INPUT]
      data = data[0] if isinstance(data, tuple) else data
      return getattr(data, "num_node_features", None)
  
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 1 for calling a global function with example usage: _get_num_features(sample) and returns: getattr