class_docstr: Adds the node degree as one hot encodings to the node features.
  
  Args:
      max_degree (int): Maximum degree.
      in_degree (bool, optional): If set to :obj:`True`, will compute the
          in-degree of nodes instead of the out-degree.
          (default: :obj:`False`)
      cat (bool, optional): Concat node degrees to node features instead
          of replacing them. (default: :obj:`True`)
code: def _extract_nodes_feature(
      self, data: autogl.data.Data
  ) -> torch.Tensor:
      idx, x = data.edge_index[1 if self.__in_degree else 0], data.x
      deg = degree(idx, data.num_nodes, dtype=torch.long)
      deg = torch.nn.functional.one_hot(
          deg, num_classes=self.__max_degree + 1
      ).to(torch.float)
      return deg
  
file_path: AutoGL/autogl/module/feature/_generators/_pyg.py
imports: import torch.nn.functional
  import autogl
  from ._basic import BaseFeatureGenerator
  from ._pyg_impl import degree, scatter_min, scatter_max, scatter_mean, scatter_std
  from .._feature_engineer_registry import FeatureEngineerUniversalRegistry
label_desc: Use image node_id 2 for calling the OneHotDegreeGenerator obj's underlying member method code with example usage: obj._extract_nodes_feature(data) and returns: deg