code: def batch(self, one_shot_iterator, batch_size=16):
      x_batch, y_batch = [], []
      for _ in range(batch_size):
          curr = one_shot_iterator.get_next()
          x_batch.append(curr["inputs"])
          y_batch.append(curr["targets"])
      return tf.stack(x_batch), tf.stack(y_batch)
  
file_path: tensor2tensor/tensor2tensor/models/research/glow_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tempfile
  import numpy
  from six.moves import range
  from tensor2tensor import problems
  from tensor2tensor.data_generators import cifar
  from tensor2tensor.models.research import glow
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 1 for calling the GlowModelTest obj's underlying member method code with example usage: obj.batch(one_shot_iterator, batch_size) and returns: tf,  tf