code: def test_SubgraphSampler_Node_Hetero(sampler_type):
      _check_sampler_type(sampler_type)
      graph = get_hetero_graph().to(F.ctx())
      items = torch.arange(3)
      names = "seed_nodes"
      if sampler_type == SamplerType.Temporal:
          graph.node_attributes = {
              "timestamp": torch.arange(
                  graph.csc_indptr.numel() - 1
              ).to(F.ctx())
          }
          graph.edge_attributes = {
              "timestamp": torch.arange(graph.indices.numel()).to(
                  F.ctx()
              )
          }
          items = (items, torch.randint(0, 10, (3,)))
          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)
      sampler_dp = sampler(item_sampler, graph, fanouts)
      assert len(list(sampler_dp)) == 2
      for minibatch in sampler_dp:
          assert len(minibatch.sampled_subgraphs) == num_layer
  
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 11 for calling a global function with example usage: test_SubgraphSampler_Node_Hetero(sampler_type) without return types