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)
Get the number of features per node in the given dataset.
src/flash/graph/classification/input.py