code: def test_add_self_loops_with_existing_self_loops():
      edge_index = torch.tensor([[0, 1, 2], [0, 1, 2]])
      data = Data(edge_index=edge_index, num_nodes=3)
      data = AddSelfLoops()(data)
      assert data.edge_index.tolist() == [
          [0, 1, 2, 0, 1, 2],
          [0, 1, 2, 0, 1, 2],
      ]
      assert data.num_nodes == 3
  
imports: import torch
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.transforms import AddSelfLoops
label_desc: Use image node_id 2 for calling a global function with example usage: test_add_self_loops_with_existing_self_loops() without return types