code: def test_keep_inter_cluster_edges():
      adj = torch.tensor(
          [
              [1, 1, 1, 0, 1, 0],
              [1, 1, 0, 1, 0, 1],
              [1, 0, 1, 0, 1, 0],
              [0, 1, 0, 1, 0, 1],
              [1, 0, 1, 0, 1, 0],
              [0, 1, 0, 1, 0, 1],
          ]
      )
  
      x = torch.tensor(
          [
              [0.0, 0.0],
              [1.0, 1.0],
              [2.0, 2.0],
              [3.0, 3.0],
              [4.0, 4.0],
              [5.0, 5.0],
          ]
      )
      edge_index = adj.nonzero(as_tuple=False).t()
      edge_attr = torch.arange(edge_index.size(1))
      data = Data(x=x, edge_index=edge_index, edge_attr=edge_attr)
      data.num_nodes = 6
  
      cluster_data = ClusterData(
          data, num_parts=2, log=False, keep_inter_cluster_edges=True
      )
  
      data = cluster_data[0]
      assert data.edge_index[0].min() == 0
      assert data.edge_index[0].max() == 2
      assert data.edge_index[1].min() == 0
      assert data.edge_index[1].max() > 2
      assert data.edge_index.size(1) == data.edge_attr.size(0)
  
      data = cluster_data[1]
      assert data.edge_index[0].min() == 0
      assert data.edge_index[0].max() == 2
      assert data.edge_index[1].min() == 0
      assert data.edge_index[1].max() > 2
      assert data.edge_index.size(1) == data.edge_attr.size(0)
  
file_path: pytorch_geometric/test/loader/test_cluster.py
imports: import pytest
  import torch
  from torch_geometric.data import Data
  from torch_geometric.loader import ClusterData, ClusterLoader
  from torch_geometric.testing import onlyFullTest, onlyOnline
  from torch_geometric.utils import sort_edge_index
label_desc: Use image node_id 2 for calling a global function with example usage: test_keep_inter_cluster_edges() without return types