code: def test_in_subgraph_homo():
      """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_nodes = 5
      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).to(F.ctx())
  
      # Extract in subgraph.
      nodes = torch.tensor([4, 1, 3], device=F.ctx())
      in_subgraph = graph.in_subgraph(nodes)
  
      # Verify in subgraph.
      assert torch.equal(
          in_subgraph.sampled_csc.indices,
          torch.tensor([0, 3, 4, 2, 3, 1, 2], device=F.ctx()),
      )
      assert torch.equal(
          in_subgraph.sampled_csc.indptr,
          torch.tensor([0, 3, 5, 7], device=F.ctx()),
      )
      assert in_subgraph.original_column_node_ids is None
      assert in_subgraph.original_row_node_ids is None
      assert torch.equal(
          in_subgraph.original_edge_ids,
          torch.tensor([9, 10, 11, 3, 4, 7, 8], device=F.ctx()),
      )
  
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 16 for calling a global function with example usage: test_in_subgraph_homo() without return types