code: def test_SubgraphSampler_unique_csc_format_Hetero(labor):
      graph = get_hetero_graph().to(F.ctx())
      itemset = gb.ItemSetDict(
          {"n2": gb.ItemSet(torch.arange(2), names="seed_nodes")}
      )
      item_sampler = gb.ItemSampler(itemset, batch_size=2).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,
      )
      csc_formats = [
          {
              "n1:e1:n2": gb.CSCFormatBase(
                  indptr=torch.tensor([0, 2, 4]),
                  indices=torch.tensor([0, 1, 1, 0]),
              ),
              "n2:e2:n1": gb.CSCFormatBase(
                  indptr=torch.tensor([0, 2, 4]),
                  indices=torch.tensor([0, 2, 0, 1]),
              ),
          },
          {
              "n1:e1:n2": gb.CSCFormatBase(
                  indptr=torch.tensor([0, 2, 4]),
                  indices=torch.tensor([0, 1, 1, 0]),
              ),
              "n2:e2:n1": gb.CSCFormatBase(
                  indptr=torch.tensor([0]),
                  indices=torch.tensor([], dtype=torch.int64),
              ),
          },
      ]
      original_column_node_ids = [
          {
              "n1": torch.tensor([0, 1]),
              "n2": torch.tensor([0, 1]),
          },
          {
              "n1": torch.tensor([], dtype=torch.int64),
              "n2": torch.tensor([0, 1]),
          },
      ]
      original_row_node_ids = [
          {
              "n1": torch.tensor([0, 1]),
              "n2": torch.tensor([0, 1, 2]),
          },
          {
              "n1": torch.tensor([0, 1]),
              "n2": torch.tensor([0, 1]),
          },
      ]
  
      for data in datapipe:
          for step, sampled_subgraph in enumerate(
              data.sampled_subgraphs
          ):
              for ntype in ["n1", "n2"]:
                  assert torch.equal(
                      sampled_subgraph.original_row_node_ids[ntype],
                      original_row_node_ids[step][ntype].to(F.ctx()),
                  )
                  assert torch.equal(
                      sampled_subgraph.original_column_node_ids[ntype],
                      original_column_node_ids[step][ntype].to(F.ctx()),
                  )
              for etype in ["n1:e1:n2", "n2:e2:n1"]:
                  assert torch.equal(
                      sampled_subgraph.sampled_csc[etype].indices,
                      csc_formats[step][etype].indices.to(F.ctx()),
                  )
                  assert torch.equal(
                      sampled_subgraph.sampled_csc[etype].indptr,
                      csc_formats[step][etype].indptr.to(F.ctx()),
                  )
  
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 21 for calling a global function with example usage: test_SubgraphSampler_unique_csc_format_Hetero(labor) without return types