code: def test_pyg_lib_and_torch_sparse_homo_equality():
      edge_index = get_random_edge_index(20, 20, 100)
      adj = to_torch_csr_tensor(edge_index.flip([0]), size=(20, 20))
      colptr, row = adj.crow_indices(), adj.col_indices()
  
      seed = torch.arange(10)
  
      sample = torch.ops.pyg.neighbor_sample
      out1 = sample(
          colptr, row, seed, [-1, -1], None, None, None, None, True
      )
      sample = torch.ops.torch_sparse.neighbor_sample
      out2 = sample(colptr, row, seed, [-1, -1], False, True)
  
      row1, col1, node_id1, edge_id1 = out1[:4]
      node_id2, row2, col2, edge_id2 = out2
      assert torch.equal(node_id1, node_id2)
      assert torch.equal(row1, row2)
      assert torch.equal(col1, col2)
      assert torch.equal(edge_id1, edge_id2)
  
imports: import os.path
  import numpy
  import pytest
  import torch
  import torch_geometric.typing
  from torch_geometric import EdgeIndex
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.loader import NeighborLoader
  from torch_geometric.nn import GraphConv, to_hetero
  from torch_geometric.sampler.base import SubgraphType
  from torch_geometric.testing import MyFeatureStore, MyGraphStore, get_random_edge_index, get_random_tensor_frame, onlyLinux, onlyNeighborSampler, onlyOnline, withCUDA, withPackage
  from torch_geometric.typing import WITH_EDGE_TIME_NEIGHBOR_SAMPLE, WITH_PYG_LIB, WITH_TORCH_SPARSE, WITH_WEIGHTED_NEIGHBOR_SAMPLE, TensorFrame
  from torch_geometric.utils import is_undirected, sort_edge_index, to_torch_csr_tensor, to_undirected
label_desc: Use image node_id 10 for calling a global function with example usage: test_pyg_lib_and_torch_sparse_homo_equality() without return types