code: def testDatasetPacking(self):
      dataset = tf.data.Dataset.from_generator(
          example_generator,
          output_types={"inputs": tf.int64, "targets": tf.int64},
          output_shapes={
              "inputs": tf.TensorShape((None,)),
              "targets": tf.TensorShape((None,)),
          },
      )
      dataset = generator_utils.pack_dataset(
          dataset,
          length=5,
          keys=("inputs", "targets"),
          use_custom_ops=False,
      )
  
      with tf.Session().as_default() as sess:
          batch = dataset.make_one_shot_iterator().get_next()
          for reference in reference_packing():
              example = sess.run(batch)
              self.assertAllEqual(
                  set(example.keys()), set(reference.keys())
              )
              for k in reference:
                  self.assertAllEqual(example[k], reference[k])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import gzip
  import io
  import os
  import tempfile
  from builtins import bytes
  from tensor2tensor.data_generators import generator_utils
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling the GeneratorUtilsTest obj's underlying member method code with example usage: obj.testDatasetPacking() without return types