code: def test_secure_split_heterogeneous(self):
      G = generate_simple_small_hete_graph()
      graph = HeteroGraph(G)
      graphs = [graph]
  
      # node task
      dataset = GraphDataset(graphs, task="node")
      split_res = dataset.split()
      for node_type in graph.node_label_index:
          num_nodes = graph.node_label_index[node_type].shape[0]
          num_nodes_reduced = num_nodes - 3
          node_0 = 1 + int(num_nodes_reduced * 0.8)
          node_1 = 1 + int(num_nodes_reduced * 0.1)
          node_2 = num_nodes - node_0 - node_1
          node_size = [node_0, node_1, node_2]
          for i in range(3):
              self.assertEqual(
                  split_res[i][0].node_label_index[node_type].shape[0],
                  node_size[i],
              )
              self.assertEqual(
                  split_res[i][0].node_label[node_type].shape[0],
                  node_size[i],
              )
  
      # edge task
      dataset = GraphDataset(graphs, task="edge")
      split_res = dataset.split()
      for message_type in graph.edge_label_index:
          num_edges = graph.edge_label_index[message_type].shape[1]
          num_edges_reduced = num_edges - 3
          edge_0 = 1 + int(num_edges_reduced * 0.8)
          edge_1 = 1 + int(num_edges_reduced * 0.1)
          edge_2 = num_edges - edge_0 - edge_1
          edge_size = [edge_0, edge_1, edge_2]
          for i in range(3):
              self.assertEqual(
                  split_res[i][0]
                  .edge_label_index[message_type]
                  .shape[1],
                  edge_size[i],
              )
              self.assertEqual(
                  split_res[i][0].edge_label[message_type].shape[0],
                  edge_size[i],
              )
  
      # link_pred task
      dataset = GraphDataset(graphs, task="link_pred")
      split_res = dataset.split()
      for message_type in graph.edge_label_index:
          num_edges = graph.edge_label_index[message_type].shape[1]
          num_edges_reduced = num_edges - 3
          edge_0 = 2 * (1 + int(num_edges_reduced * 0.8))
          edge_1 = 2 * (1 + int(num_edges_reduced * 0.1))
          edge_2 = 2 * num_edges - edge_0 - edge_1
          edge_size = [edge_0, edge_1, edge_2]
          for i in range(3):
              self.assertEqual(
                  split_res[i][0]
                  .edge_label_index[message_type]
                  .shape[1],
                  edge_size[i],
              )
              self.assertEqual(
                  split_res[i][0].edge_label[message_type].shape[0],
                  edge_size[i],
              )
  
imports: 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 simple_networkx_graph, simple_networkx_small_graph, simple_networkx_graph_alphabet, simple_networkx_dense_graph, simple_networkx_dense_multigraph, simple_networkx_multigraph, generate_dense_hete_dataset, generate_simple_small_hete_graph, generate_simple_dense_hete_graph, generate_simple_dense_hete_multigraph, generate_dense_hete_multigraph, gen_graph
label_desc: Use image node_id 12 for calling the TestDataset obj's underlying member method code with example usage: obj.test_secure_split_heterogeneous() without return types