code: def __call__(self, static_graph: GeneralStaticGraph) -> dgl.DGLGraph:
      dgl_graph: dgl.DGLGraph = dgl.heterograph(
          dict(
              [
                  (
                      (
                          canonical_edge_type.source_node_type,
                          canonical_edge_type.relation_type,
                          canonical_edge_type.target_node_type,
                      ),
                      (
                          static_graph.edges[
                              canonical_edge_type
                          ].connections[0],
                          static_graph.edges[
                              canonical_edge_type
                          ].connections[1],
                      ),
                  )
                  for canonical_edge_type in static_graph.edges
              ]
          )
      )
      for node_type in static_graph.nodes:
          for data_key in static_graph.nodes[node_type].data:
              dgl_graph.nodes[node_type].data[
                  data_key
              ] = static_graph.nodes[node_type].data[data_key]
      for canonical_edge_type in static_graph.edges:
          for data_key in static_graph.edges[canonical_edge_type].data:
              dgl_graph.edges[
                  (
                      canonical_edge_type.source_node_type,
                      canonical_edge_type.relation_type,
                      canonical_edge_type.target_node_type,
                  )
              ].data[data_key] = static_graph.edges[
                  canonical_edge_type
              ].data[
                  data_key
              ]
      # Set graph level data by `setattr`
      if len(static_graph.data) > 0:
          setattr(dgl_graph, "graph_data", dict(static_graph.data))
          if "gf" in static_graph.data:
              setattr(
                  dgl_graph,
                  "gf",
                  static_graph.data["gf"].detach().clone(),
              )
      return dgl_graph
  
file_path: AutoGL/autogl/data/graph/_general_static_graph/utils/conversion/_dgl.py
imports: import dgl
  import torch
  import typing
  from ..._general_static_graph import GeneralStaticGraph
  from ...None import _general_static_graph_generator, _general_static_graph_dgl_implementation
label_desc: Use image node_id 2 for calling the GeneralStaticGraphToDGLGraph obj's underlying member method code with example usage: obj.__call__(static_graph) and returns: dgl_graph