code: def generate_shard_args(outfiles, num_examples):
      """Generate start and end indices per outfile."""
      num_shards = len(outfiles)
      num_examples_per_shard = num_examples // num_shards
      start_idxs = [
          i * num_examples_per_shard for i in range(num_shards)
      ]
      end_idxs = list(start_idxs)
      end_idxs.pop(0)
      end_idxs.append(num_examples)
      return zip(start_idxs, end_idxs, outfiles)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import multiprocessing
  import os
  import h5py
  import numpy
  from six.moves import range
  from tensor2tensor.data_generators import dna_encoder
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import metrics
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling a global function with example usage: generate_shard_args(outfiles, num_examples) and returns: zip