code: def test_resample_disjoint(self):
      pyg_dataset = Planetoid("./cora", "Cora")
      graphs = GraphDataset.pyg_to_graphs(pyg_dataset)
      dataset = GraphDataset(
          graphs,
          task="link_pred",
          edge_train_mode="disjoint",
          edge_message_ratio=0.8,
          resample_disjoint=True,
          resample_disjoint_period=1,
      )
      dataset_train, _, _ = dataset.split(split_ratio=[0.5, 0.2, 0.3])
      graph_train_first = dataset_train[0]
      graph_train_second = dataset_train[0]
  
      self.assertEqual(
          graph_train_first.edge_label_index.shape[1],
          graph_train_second.edge_label_index.shape[1],
      )
      self.assertTrue(
          torch.equal(
              graph_train_first.edge_label,
              graph_train_second.edge_label,
          )
      )
  
      (
          G,
          x,
          y,
          edge_x,
          edge_y,
          edge_index,
          graph_x,
          graph_y,
      ) = simple_networkx_graph()
      Graph.add_edge_attr(G, "edge_feature", edge_x)
      Graph.add_edge_attr(G, "edge_label", edge_y)
      Graph.add_node_attr(G, "node_feature", x)
      Graph.add_node_attr(G, "node_label", y)
      Graph.add_graph_attr(G, "graph_feature", graph_x)
      Graph.add_graph_attr(G, "graph_label", graph_y)
  
      graph = Graph(G)
      graphs = [graph]
      dataset = GraphDataset(
          graphs,
          task="link_pred",
          edge_train_mode="disjoint",
          edge_message_ratio=0.8,
          resample_disjoint=True,
          resample_disjoint_period=1,
      )
      dataset_train, _, _ = dataset.split(split_ratio=[0.5, 0.2, 0.3])
      graph_train_first = dataset_train[0]
      graph_train_second = dataset_train[0]
  
      self.assertEqual(
          graph_train_first.edge_label_index.shape[1],
          graph_train_second.edge_label_index.shape[1],
      )
      self.assertEqual(
          graph_train_first.edge_label.shape[0],
          graph_train_second.edge_label.shape[0],
      )
  
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 11 for calling the TestDataset obj's underlying member method code with example usage: obj.test_resample_disjoint() without return types