code: def test_dataset_property(self):
      (
          _,
          x,
          y,
          edge_x,
          edge_y,
          edge_index,
          graph_x,
          graph_y,
      ) = simple_networkx_graph()
      G = Graph(
          node_feature=x,
          node_label=y,
          edge_index=edge_index,
          edge_feature=edge_x,
          edge_label=edge_y,
          graph_feature=graph_x,
          graph_label=graph_y,
          directed=True,
      )
  
      H = deepcopy(G)
  
      H.graph_label = torch.tensor([1])
  
      graphs = [G, H]
      dataset = GraphDataset(graphs)
      self.assertEqual(dataset.num_node_labels, 5)
      self.assertEqual(dataset.num_node_features, 2)
      self.assertEqual(dataset.num_edge_labels, 4)
      self.assertEqual(dataset.num_edge_features, 2)
      self.assertEqual(dataset.num_graph_labels, 2)
      self.assertEqual(dataset.num_graph_features, 2)
      self.assertEqual(dataset.num_labels, 5)  # node task
      dataset = GraphDataset(graphs, task="edge")
      self.assertEqual(dataset.num_labels, 4)
      dataset = GraphDataset(graphs, task="link_pred")
      self.assertEqual(dataset.num_labels, 5)
      dataset = GraphDataset(graphs, task="graph")
      self.assertEqual(dataset.num_labels, 2)
  
imports: import copy
  import random
  import torch
  import unittest
  from torch_geometric.datasets import TUDataset, Planetoid
  from copy import deepcopy
  from deepsnap.graph import Graph
  from deepsnap.hetero_graph import HeteroGraph
  from deepsnap.dataset import GraphDataset, Generator, EnsembleGenerator
  from tests.utils import pyg_to_dicts, simple_networkx_graph, simple_networkx_small_graph, simple_networkx_graph_alphabet, simple_networkx_multigraph, generate_dense_hete_dataset, generate_simple_small_hete_graph, gen_graph
label_desc: Use image node_id 2 for calling the TestDatasetTensorBackend obj's underlying member method code with example usage: obj.test_dataset_property() without return types