class_docstr: SampleTest
      
docstr: test_graphsage_sample
          
code: def test_graphsage_sample(self):
      """test_graphsage_sample"""
      eids = np.random.choice(self.graph.num_edges, 1000)
      edges = self.graph.get_edges_by_id(eids)
      nodes = [n for edge in edges for n in edge]
      ignore_edges = edges.tolist() + edges[:, [1, 0]].tolist()
  
      np.random.seed(1)
      subgraphs = graphsage_sample(self.graph, nodes, [10, 10], [])
  
      np.random.seed(1)
      subgraphs_ignored = graphsage_sample(
          self.graph, nodes, [10, 10], ignore_edges
      )
  
      self.assertEqual(
          subgraphs[0].num_nodes, subgraphs_ignored[0].num_nodes
      )
      self.assertGreaterEqual(
          subgraphs[0].num_edges, subgraphs_ignored[0].num_edges
      )
  
file_path: PGL/legacy/pgl/tests/test_sample.py
imports: import unittest
  import os
  import json
  import numpy
  from pgl.redis_graph import RedisGraph
  from pgl.sample import graphsage_sample
  from pgl.sample import node2vec_sample
label_desc: Use image node_id 2 for calling the SampleTest obj's underlying member method code with example usage: obj.test_graphsage_sample() without return types