code: def test_SubgraphSampler_unique_csc_format_Homo_cpu(labor):
      torch.manual_seed(1205)
      graph = dgl.graph(([5, 0, 6, 7, 2, 2, 4], [0, 1, 2, 2, 3, 4, 4]))
      graph = gb.from_dglgraph(graph, True).to(F.ctx())
      seed_nodes = torch.LongTensor([0, 3, 4])
  
      itemset = gb.ItemSet(seed_nodes, names="seed_nodes")
      item_sampler = gb.ItemSampler(
          itemset, batch_size=len(seed_nodes)
      ).copy_to(F.ctx())
      num_layer = 2
      fanouts = [torch.LongTensor([2]) for _ in range(num_layer)]
  
      Sampler = gb.LayerNeighborSampler if labor else gb.NeighborSampler
      datapipe = Sampler(
          item_sampler,
          graph,
          fanouts,
          deduplicate=True,
      )
  
      original_row_node_ids = [
          torch.tensor([0, 3, 4, 5, 2, 6, 7]).to(F.ctx()),
          torch.tensor([0, 3, 4, 5, 2]).to(F.ctx()),
      ]
      compacted_indices = [
          torch.tensor([3, 4, 4, 2, 5, 6]).to(F.ctx()),
          torch.tensor([3, 4, 4, 2]).to(F.ctx()),
      ]
      indptr = [
          torch.tensor([0, 1, 2, 4, 4, 6]).to(F.ctx()),
          torch.tensor([0, 1, 2, 4]).to(F.ctx()),
      ]
      seeds = [
          torch.tensor([0, 3, 4, 5, 2]).to(F.ctx()),
          torch.tensor([0, 3, 4]).to(F.ctx()),
      ]
      for data in datapipe:
          for step, sampled_subgraph in enumerate(
              data.sampled_subgraphs
          ):
              assert torch.equal(
                  sampled_subgraph.original_row_node_ids,
                  original_row_node_ids[step],
              )
              assert torch.equal(
                  sampled_subgraph.sampled_csc.indices,
                  compacted_indices[step],
              )
              assert torch.equal(
                  sampled_subgraph.sampled_csc.indptr, indptr[step]
              )
              assert torch.equal(
                  sampled_subgraph.original_column_node_ids, seeds[step]
              )
  
imports: import unittest
  from enum import Enum
  from functools import partial
  import backend
  import dgl
  import dgl.graphbolt
  import pytest
  import torch
  from torchdata.datapipes.iter import Mapper
  from .None import gb_test_utils
label_desc: Use image node_id 19 for calling a global function with example usage: test_SubgraphSampler_unique_csc_format_Homo_cpu(labor) without return types