code: def test_get_renumber_map():
      sampled_df = get_dummy_sampled_df()
  
      df, renumber_map, renumber_map_batch_indices = _get_renumber_map(
          sampled_df
      )
  
      # Ensure that map was dropped
      assert "map" not in df.columns
  
      expected_map = torch.as_tensor(
          [10, 11, 12, 13, 14, 15, 16, 17, 18],
          dtype=torch.int32,
          device="cuda",
      )
      assert torch.equal(renumber_map, expected_map)
  
      expected_batch_indices = torch.as_tensor(
          [3, 6], dtype=torch.int32, device="cuda"
      )
      assert torch.equal(
          renumber_map_batch_indices, expected_batch_indices
      )
  
      # Ensure we dropped the Nans for rows  corresponding to the renumber_map
      assert len(df) == 9
  
      t_ls = _split_tensor(renumber_map, renumber_map_batch_indices)
      assert torch.equal(
          t_ls[0],
          torch.as_tensor(
              [10, 11, 12], dtype=torch.int64, device="cuda"
          ),
      )
      assert torch.equal(
          t_ls[1],
          torch.as_tensor(
              [13, 14, 15], dtype=torch.int64, device="cuda"
          ),
      )
      assert torch.equal(
          t_ls[2],
          torch.as_tensor(
              [16, 17, 18], dtype=torch.int64, device="cuda"
          ),
      )
  
file_path: cugraph/python/cugraph-dgl/tests/test_utils.py
imports: import cudf
  import cupy
  import numpy
  from cugraph_dgl.dataloading.utils.sampling_helpers import cast_to_tensor, _get_renumber_map, _split_tensor, _get_tensor_d_from_sampled_df, create_homogeneous_sampled_graphs_from_dataframe, _get_source_destination_range, _create_homogeneous_cugraph_dgl_nn_sparse_graph, create_homogeneous_sampled_graphs_from_dataframe_csc
  from cugraph.utilities.utils import import_optional
label_desc: Use image node_id 4 for calling a global function with example usage: test_get_renumber_map() without return types