code: def test_pyg_to_graph(self):
      pyg_dataset = Planetoid("./cora", "Cora")
  
      dg = Graph.pyg_to_graph(pyg_dataset[0])
      pyg_data = pyg_dataset[0]
      self.assertEqual(pyg_data.num_nodes, dg.num_nodes)
      self.assertEqual(pyg_data.is_directed(), dg.is_directed())
      self.assertEqual(pyg_data.num_edges / 2, dg.num_edges)
      self.assertTrue(dg.num_node_features == pyg_data.x.shape[1])
      self.assertTrue(
          dg.num_node_labels == torch.max(pyg_data.y).item() + 1
      )
      self.assertTrue(dg.edge_index.shape == pyg_data.edge_index.shape)
      keys = [
          "G",
          "node_feature",
          "node_label",
          "edge_index",
          "edge_label_index",
          "node_label_index",
      ]
      self.assertTrue(tuple(dg.keys) == tuple(keys))
  
file_path: deepsnap/tests/test_graph.py
imports: import torch
  import unittest
  import numpy
  from tests.utils import simple_networkx_graph
  from deepsnap.graph import Graph
  from torch_geometric.datasets import Planetoid
label_desc: Use image node_id 5 for calling the TestGraph obj's underlying member method code with example usage: obj.test_pyg_to_graph() without return types