code: def test_SubgraphSampler_without_dedpulication_Homo(sampler_type):
      _check_sampler_type(sampler_type)
      graph = dgl.graph(
          ([5, 0, 1, 5, 6, 7, 2, 2, 4], [0, 1, 2, 2, 2, 2, 3, 4, 4])
      )
      graph = gb.from_dglgraph(graph, True).to(F.ctx())
      seed_nodes = torch.LongTensor([0, 3, 4])
      items = seed_nodes
      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, (3,)))
          names = (names, "timestamp")
  
      itemset = gb.ItemSet(items, names=names)
      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 = _get_sampler(sampler_type)
      if sampler_type == SamplerType.Temporal:
          datapipe = sampler(item_sampler, graph, fanouts)
      else:
          datapipe = sampler(
              item_sampler, graph, fanouts, deduplicate=False
          )
  
      length = [17, 7]
      compacted_indices = [
          (torch.arange(0, 10) + 7).to(F.ctx()),
          (torch.arange(0, 4) + 3).to(F.ctx()),
      ]
      indptr = [
          torch.tensor([0, 1, 2, 4, 4, 6, 8, 10]).to(F.ctx()),
          torch.tensor([0, 1, 2, 4]).to(F.ctx()),
      ]
      seeds = [
          torch.tensor([0, 2, 2, 3, 4, 4, 5]).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 (
                  len(sampled_subgraph.original_row_node_ids)
                  == length[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(
                  torch.sort(sampled_subgraph.original_column_node_ids)[
                      0
                  ],
                  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 17 for calling a global function with example usage: test_SubgraphSampler_without_dedpulication_Homo(sampler_type) without return types