code: def test_unique_and_compact_csc_formats_homo():
      seeds = torch.tensor([1, 3, 5, 2, 6])
      indptr = torch.tensor([0, 2, 4, 6, 7, 11])
      indices = torch.tensor([2, 3, 1, 4, 5, 2, 5, 1, 4, 4, 6])
      csc_formats = gb.CSCFormatBase(indptr=indptr, indices=indices)
  
      expected_unique_nodes = torch.tensor([1, 3, 5, 2, 6, 4])
      expected_indptr = indptr
      expected_indices = torch.tensor([3, 1, 0, 5, 2, 3, 2, 0, 5, 5, 4])
  
      (
          unique_nodes,
          compacted_csc_formats,
      ) = gb.unique_and_compact_csc_formats(csc_formats, seeds)
  
      indptr = compacted_csc_formats.indptr
      indices = compacted_csc_formats.indices
      assert torch.equal(indptr, expected_indptr)
      assert torch.equal(indices, expected_indices)
      assert torch.equal(unique_nodes, expected_unique_nodes)
  
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 8 for calling a global function with example usage: test_unique_and_compact_csc_formats_homo() without return types