code: def ogbn_dataset_to_general_static_graph(
      cls,
      ogbn_dataset: NodePropPredDataset,
      nodes_label_key: str,
      nodes_data_key_mapping: _typing.Optional[
          _typing.Mapping[str, str]
      ] = ...,
      edges_data_key_mapping: _typing.Optional[
          _typing.Mapping[str, str]
      ] = ...,
      graph_data_key_mapping: _typing.Optional[
          _typing.Mapping[str, str]
      ] = ...,
  ) -> GeneralStaticGraph:
      split_idx = ogbn_dataset.get_idx_split()
      return cls.ogbn_data_to_general_static_graph(
          ogbn_dataset[0][0],
          ogbn_dataset[0][1],
          nodes_label_key,
          split_idx["train"],
          split_idx["valid"],
          split_idx["test"],
          nodes_data_key_mapping,
          edges_data_key_mapping,
          graph_data_key_mapping,
      )
  
imports: import numpy
  import torch
  import typing
  from autogl import backend
  from torch_sparse import SparseTensor
  from autogl import backend
  from autogl.data import InMemoryStaticGraphSet
  from autogl.data.graph import GeneralStaticGraph, GeneralStaticGraphGenerator
  from ._dataset_registry import DatasetUniversalRegistry
  from .utils import index_to_mask
label_desc: Use image node_id 2 for calling the _OGBNDatasetUtil obj's underlying member method code with example usage: obj.ogbn_dataset_to_general_static_graph(cls, ogbn_dataset, nodes_label_key, nodes_data_key_mapping, edges_data_key_mapping, graph_data_key_mapping) and returns: cls