code: def sample_from_text_line_datasets(
      glob_weight_list, shuffle_buffer_size=100000, prefetch=1000
  ):  # pylint: disable=missing-docstring
      globs, weights = zip(*glob_weight_list)
      datasets = [
          tf.data.TextLineDataset(tf.gfile.Glob(g))
          .repeat()
          .shuffle(shuffle_buffer_size)
          .prefetch(prefetch)
          for g in globs
      ]
      return tf.data.experimental.sample_from_datasets(
          datasets=datasets, weights=weights
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import os
  import gin
  import tensorflow.compat.v1
  import tensorflow_datasets
label_desc: Use image node_id 5 for calling a global function with example usage: sample_from_text_line_datasets(glob_weight_list, shuffle_buffer_size, prefetch) and returns: tf