code: def test_compact_csc_format_hetero():
      dst_nodes = {
          "n2": torch.tensor([2, 4, 1, 3]),
          "n3": torch.tensor([1, 3, 2, 7]),
      }
      csc_formats = {
          "n1:e1:n2": gb.CSCFormatBase(
              indptr=torch.tensor([0, 3, 4, 7, 10]),
              indices=torch.tensor([1, 3, 4, 6, 2, 7, 9, 4, 2, 6]),
          ),
          "n1:e2:n3": gb.CSCFormatBase(
              indptr=torch.tensor([0, 1, 4, 7, 10]),
              indices=torch.tensor([5, 2, 6, 4, 7, 2, 8, 1, 3, 0]),
          ),
          "n2:e3:n3": gb.CSCFormatBase(
              indptr=torch.tensor([0, 2, 4, 6, 8]),
              indices=torch.tensor([2, 5, 4, 1, 4, 3, 6, 0]),
          ),
      }
  
      expected_original_row_ids = {
          "n1": torch.tensor(
              [
                  1,
                  3,
                  4,
                  6,
                  2,
                  7,
                  9,
                  4,
                  2,
                  6,
                  5,
                  2,
                  6,
                  4,
                  7,
                  2,
                  8,
                  1,
                  3,
                  0,
              ]
          ),
          "n2": torch.tensor([2, 4, 1, 3, 2, 5, 4, 1, 4, 3, 6, 0]),
          "n3": torch.tensor([1, 3, 2, 7]),
      }
      expected_csc_formats = {
          "n1:e1:n2": gb.CSCFormatBase(
              indptr=torch.tensor([0, 3, 4, 7, 10]),
              indices=torch.arange(0, 10),
          ),
          "n1:e2:n3": gb.CSCFormatBase(
              indptr=torch.tensor([0, 1, 4, 7, 10]),
              indices=torch.arange(0, 10) + 10,
          ),
          "n2:e3:n3": gb.CSCFormatBase(
              indptr=torch.tensor([0, 2, 4, 6, 8]),
              indices=torch.arange(0, 8) + 4,
          ),
      }
      original_row_ids, compacted_csc_formats = gb.compact_csc_format(
          csc_formats, dst_nodes
      )
  
      for ntype, nodes in original_row_ids.items():
          expected_nodes = expected_original_row_ids[ntype]
          assert torch.equal(nodes, expected_nodes)
      for etype, csc_format in compacted_csc_formats.items():
          indptr = csc_format.indptr
          indices = csc_format.indices
          expected_indptr = expected_csc_formats[etype].indptr
          expected_indices = expected_csc_formats[etype].indices
          assert torch.equal(indptr, expected_indptr)
          assert torch.equal(indices, expected_indices)
  
file_path: dgl/tests/python/pytorch/graphbolt/test_graphbolt_utils.py
imports: import backend
  import dgl.graphbolt
  import pytest
  import torch
label_desc: Use image node_id 10 for calling a global function with example usage: test_compact_csc_format_hetero() without return types