code: def test_to_dense_adj_with_duplicate_entries():
      edge_index = torch.tensor(
          [
              [0, 0, 0, 1, 2, 3, 3, 4],
              [0, 0, 1, 0, 3, 4, 4, 2],
          ]
      )
      batch = torch.tensor([0, 0, 1, 1, 1])
  
      adj = to_dense_adj(edge_index, batch)
      assert adj.size() == (2, 3, 3)
      assert adj[0].tolist() == [[2, 1, 0], [1, 0, 0], [0, 0, 0]]
      assert adj[1].tolist() == [[0, 1, 0], [0, 0, 2], [1, 0, 0]]
  
      edge_attr = torch.tensor([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0])
      adj = to_dense_adj(edge_index, batch, edge_attr)
      assert adj.size() == (2, 3, 3)
      assert adj[0].tolist() == [
          [3.0, 3.0, 0.0],
          [4.0, 0.0, 0.0],
          [0.0, 0.0, 0.0],
      ]
      assert adj[1].tolist() == [
          [0.0, 5.0, 0.0],
          [0.0, 0.0, 13.0],
          [8.0, 0.0, 0.0],
      ]
  
imports: import torch
  from torch_geometric.testing import is_full_test
  from torch_geometric.utils import to_dense_adj
label_desc: Use image node_id 3 for calling a global function with example usage: test_to_dense_adj_with_duplicate_entries() without return types