code: def test_hetero_graph_basics(self):
      G = generate_simple_hete_graph()
      hete = HeteroGraph(G)
      hete = HeteroGraph(
          node_feature=hete.node_feature,
          node_label=hete.node_label,
          edge_feature=hete.edge_feature,
          edge_label=hete.edge_label,
          edge_index=hete.edge_index,
          directed=True,
      )
  
      self.assertEqual(hete.num_node_features("n1"), 10)
      self.assertEqual(hete.num_node_features("n2"), 12)
      self.assertEqual(hete.num_edge_features(("n1", "e1", "n1")), 8)
      self.assertEqual(hete.num_edge_features(("n1", "e2", "n2")), 12)
      self.assertEqual(hete.num_nodes("n1"), 4)
      self.assertEqual(hete.num_nodes("n2"), 5)
      self.assertEqual(len(hete.node_types), 2)
      self.assertEqual(len(hete.edge_types), 2)
  
      message_types = hete.message_types
      self.assertEqual(len(message_types), 7)
      self.assertEqual(hete.num_node_labels("n1"), 2)
      self.assertEqual(hete.num_node_labels("n2"), 2)
      self.assertEqual(hete.num_edge_labels(("n1", "e1", "n1")), 2)
      self.assertEqual(hete.num_edge_labels(("n1", "e2", "n2")), 2)
      self.assertEqual(hete.num_edges(message_types[0]), 3)
      self.assertEqual(len(hete.node_label_index), 2)
  
file_path: deepsnap/tests/test_hetero_graph_tensor_backend.py
imports: import math
  import unittest
  from torch.utils.data import DataLoader
  from tests.utils import generate_simple_hete_graph, generate_dense_hete_graph, generate_dense_hete_multigraph
  from deepsnap.batch import Batch
  from deepsnap.hetero_graph import HeteroGraph
label_desc: Use image node_id 1 for calling the TestHeteroGraphTensorBackend obj's underlying member method code with example usage: obj.test_hetero_graph_basics() without return types