code: def _sample_next_edges(edges, to_sample):
      if len(edges) < to_sample:
          return edges
      sample_ids = np.random.choice(
          range(len(edges)), size=to_sample, replace=False
      )
      return [edges[i] for i in sample_ids]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import clueweb_text_graph
  import numpy
  import tensorflow
label_desc: Use image node_id 7 for calling a global function with example usage: _sample_next_edges(edges, to_sample) and returns: unknown, edges