code: def apply_data_aug():
      """Apply data augmentation and save augmented results."""
      if not tf.gfile.IsDirectory(FLAGS.output_folder):
          tf.gfile.MakeDirs(FLAGS.output_folder)
  
      dataset = _dataset_creator()
      ds_iterator = dataset.make_initializable_iterator()
      image, label = ds_iterator.get_next()
  
      with tf.Session() as sess:
          sess.run(ds_iterator.initializer)
          for idx in range(FLAGS.num_data_aug):
              image_np, label_np = sess.run([image, label])
              save_to_tfrecord(
                  image_np,
                  label_np,
                  FLAGS.process_no,
                  idx,
                  FLAGS.output_folder,
                  FLAGS.output_file_prefix,
              )
      return
  
file_path: mesh/mesh_tensorflow/experimental/offline_data_aug.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import os
  from absl import app
  from absl import flags
  from six.moves import range
  import tensorflow.compat.v1
  from mesh_tensorflow.experimental import data_aug_lib
label_desc: Use image node_id 3 for calling a global function with example usage: apply_data_aug() without return types