code: def test_random_link_split_on_undirected_hetero_data():
      data = HeteroData()
      data["p"].x = torch.arange(100)
      data["p", "p"].edge_index = get_random_edge_index(100, 100, 500)
      data["p", "p"].edge_index = to_undirected(
          data["p", "p"].edge_index
      )
  
      transform = RandomLinkSplit(
          is_undirected=True, edge_types=("p", "p")
      )
      train_data, val_data, test_data = transform(data)
      assert train_data["p", "p"].is_undirected()
  
      transform = RandomLinkSplit(
          is_undirected=True,
          edge_types=("p", "p"),
          rev_edge_types=("p", "p"),
      )
      train_data, val_data, test_data = transform(data)
      assert train_data["p", "p"].is_undirected()
  
      transform = RandomLinkSplit(
          is_undirected=True,
          edge_types=("p", "p"),
          rev_edge_types=("p", "p"),
      )
      train_data, val_data, test_data = transform(data)
      assert train_data["p", "p"].is_undirected()
  
file_path: pytorch_geometric/test/transforms/test_random_link_split.py
imports: import pytest
  import torch
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.testing import get_random_edge_index, onlyFullTest, onlyOnline
  from torch_geometric.transforms import RandomLinkSplit
  from torch_geometric.utils import is_undirected, to_undirected
label_desc: Use image node_id 5 for calling a global function with example usage: test_random_link_split_on_undirected_hetero_data() without return types