code: def test_exclude_edges_hetero_duplicated(reverse_row, reverse_column):
      csc_formats = {
          "A:relation:B": gb.CSCFormatBase(
              indptr=torch.tensor([0, 2, 4, 5]),
              indices=torch.tensor([2, 2, 1, 1, 0]),
          )
      }
      if reverse_row:
          original_row_node_ids = {
              "A": torch.tensor([13, 14, 15]),
          }
          src_to_exclude = torch.tensor([15, 13])
      else:
          original_row_node_ids = None
          src_to_exclude = torch.tensor([2, 0])
      if reverse_column:
          original_column_node_ids = {
              "B": torch.tensor([10, 11, 12]),
          }
          dst_to_exclude = torch.tensor([10, 12])
      else:
          original_column_node_ids = None
          dst_to_exclude = torch.tensor([0, 2])
      original_edge_ids = {
          "A:relation:B": torch.tensor([19, 19, 20, 20, 21])
      }
      subgraph = SampledSubgraphImpl(
          sampled_csc=csc_formats,
          original_column_node_ids=original_column_node_ids,
          original_row_node_ids=original_row_node_ids,
          original_edge_ids=original_edge_ids,
      )
  
      edges_to_exclude = {
          "A:relation:B": (
              src_to_exclude,
              dst_to_exclude,
          )
      }
      result = subgraph.exclude_edges(edges_to_exclude)
      expected_csc_formats = {
          "A:relation:B": gb.CSCFormatBase(
              indptr=torch.tensor([0, 0, 2, 2]),
              indices=torch.tensor([1, 1]),
          )
      }
      if reverse_row:
          expected_row_node_ids = {
              "A": torch.tensor([13, 14, 15]),
          }
      else:
          expected_row_node_ids = None
      if reverse_column:
          expected_column_node_ids = {
              "B": torch.tensor([10, 11, 12]),
          }
      else:
          expected_column_node_ids = None
      expected_edge_ids = {"A:relation:B": torch.tensor([20, 20])}
  
      _assert_container_equal(result.sampled_csc, expected_csc_formats)
      _assert_container_equal(
          result.original_column_node_ids, expected_column_node_ids
      )
      _assert_container_equal(
          result.original_row_node_ids, expected_row_node_ids
      )
      _assert_container_equal(
          result.original_edge_ids, expected_edge_ids
      )
  
file_path: dgl/tests/python/pytorch/graphbolt/impl/test_sampled_subgraph_impl.py
imports: import unittest
  import backend
  import dgl.graphbolt
  import pytest
  import torch
  from dgl.graphbolt.impl.sampled_subgraph_impl import SampledSubgraphImpl
label_desc: Use image node_id 5 for calling a global function with example usage: test_exclude_edges_hetero_duplicated(reverse_row, reverse_column) without return types