code: def next_batch(x_train, M):
      idx_batch = np.random.choice(FLAGS.N, M)
      return x_train[:, idx_batch], idx_batch
  
file_path: edward/examples/probabilistic_pca_subsampling.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import edward
  import numpy
  import tensorflow
  from edward.models import Normal
label_desc: Use image node_id 2 for calling a global function with example usage: next_batch(x_train, M) and returns: x_train,  idx_batch