code: def test_SubgraphSampler_without_dedpulication_Hetero(sampler_type):
      _check_sampler_type(sampler_type)
      graph = get_hetero_graph().to(F.ctx())
      items = torch.arange(2)
      names = "seed_nodes"
      if sampler_type == SamplerType.Temporal:
          graph.node_attributes = {
              "timestamp": torch.zeros(graph.csc_indptr.numel() - 1).to(
                  F.ctx()
              )
          }
          graph.edge_attributes = {
              "timestamp": torch.zeros(graph.indices.numel()).to(
                  F.ctx()
              )
          }
          items = (items, torch.randint(1, 10, (2,)))
          names = (names, "timestamp")
      itemset = gb.ItemSetDict({"n2": gb.ItemSet(items, names=names)})
      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 = _get_sampler(sampler_type)
      if sampler_type == SamplerType.Temporal:
          datapipe = sampler(item_sampler, graph, fanouts)
      else:
          datapipe = sampler(
              item_sampler, graph, fanouts, deduplicate=False
          )
      csc_formats = [
          {
              "n1:e1:n2": gb.CSCFormatBase(
                  indptr=torch.tensor([0, 2, 4]),
                  indices=torch.tensor([4, 5, 6, 7]),
              ),
              "n2:e2:n1": gb.CSCFormatBase(
                  indptr=torch.tensor([0, 2, 4, 6, 8]),
                  indices=torch.tensor([2, 3, 4, 5, 6, 7, 8, 9]),
              ),
          },
          {
              "n1:e1:n2": gb.CSCFormatBase(
                  indptr=torch.tensor([0, 2, 4]),
                  indices=torch.tensor([0, 1, 2, 3]),
              ),
              "n2:e2:n1": gb.CSCFormatBase(
                  indptr=torch.tensor([0]),
                  indices=torch.tensor([], dtype=torch.int64),
              ),
          },
      ]
      original_column_node_ids = [
          {
              "n1": torch.tensor([0, 1, 1, 0]),
              "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, 1, 0, 0, 1, 1, 0]),
              "n2": torch.tensor([0, 1, 0, 2, 0, 1, 0, 1, 0, 2]),
          },
          {
              "n1": torch.tensor([0, 1, 1, 0]),
              "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 18 for calling a global function with example usage: test_SubgraphSampler_without_dedpulication_Hetero(sampler_type) without return types