code: def _extract_nodes_feature(
      self, data: autogl.data.Data
  ) -> torch.Tensor:
      num_nodes: int = (
          data.x.size(0)
          if data.x is not None and isinstance(data.x, torch.Tensor)
          else (data.edge_index.max().item() + 1)
      )
      return torch.eye(num_nodes)
  
file_path: AutoGL/autogl/module/preprocessing/feature_engineering/_generators/_basic.py
imports: import torch
  import typing
  import autogl
  from autogl.data.graph import GeneralStaticGraph
  from .._feature_engineer import FeatureEngineer
  from ..._data_preprocessor_registry import DataPreprocessorUniversalRegistry
label_desc: Use image node_id 1 for calling the OneHotFeatureGenerator obj's underlying member method code with example usage: obj._extract_nodes_feature(data) and returns: torch