code: def test_sample_neighbors_homo(labor, is_pinned):
      """Original graph in COO:
      1   0   1   0   1
      1   0   1   1   0
      0   1   0   1   0
      0   1   0   0   1
      1   0   0   0   1
      """
      # Initialize data.
      total_num_edges = 12
      indptr = torch.LongTensor([0, 3, 5, 7, 9, 12])
      indices = torch.LongTensor([0, 1, 4, 2, 3, 0, 1, 1, 2, 0, 3, 4])
      assert indptr[-1] == total_num_edges
      assert indptr[-1] == len(indices)
  
      # Construct FusedCSCSamplingGraph.
      graph = gb.fused_csc_sampling_graph(indptr, indices)
      if F._default_context_str == "gpu":
          if is_pinned:
              graph.pin_memory_()
          else:
              graph = graph.to(F.ctx())
  
      # Generate subgraph via sample neighbors.
      nodes = torch.LongTensor([1, 3, 4]).to(F.ctx())
      sampler = (
          graph.sample_layer_neighbors
          if labor
          else graph.sample_neighbors
      )
      subgraph = sampler(nodes, fanouts=torch.LongTensor([2]))
  
      # Verify in subgraph.
      sampled_indptr_num = subgraph.sampled_csc.indptr.size(0)
      sampled_num = subgraph.sampled_csc.indices.size(0)
      assert sampled_indptr_num == 4
      assert sampled_num == 6
      assert subgraph.original_column_node_ids is None
      assert subgraph.original_row_node_ids is None
      assert subgraph.original_edge_ids is None
  
imports: import os
  import pickle
  import re
  import tempfile
  import unittest
  import backend
  import dgl
  import dgl.graphbolt
  import pytest
  import torch
  import torch.multiprocessing
  from dgl.graphbolt.base import etype_str_to_tuple
  from scipy import sparse
  from ..None import gb_test_utils
label_desc: Use image node_id 33 for calling a global function with example usage: test_sample_neighbors_homo(labor, is_pinned) without return types