code: def batch_gather(values, indices):
      """Returns batched `tf.gather` for every row in the input."""
      unpacked = zip(tf.unstack(values), tf.unstack(indices))
      result = [tf.gather(value, index) for value, index in unpacked]
      return tf.stack(result)
  
file_path: sonnet/sonnet/src/nets/dnc/util.py
imports: import numpy
  import tensorflow
  import tree
label_desc: Use image node_id 3 for calling a global function with example usage: batch_gather(values, indices) and returns: tf