code: def example_generator(all_files, urls_path, sum_token):
      """Generate examples."""
  
      def fix_run_on_sents(line):
          if "@highlight" in line:
              return line
          if not line:
              return line
          if line[-1] in END_TOKENS:
              return line
          return line + "."
  
      filelist = example_splits(urls_path, all_files)
      story_summary_split_token = " <summary> " if sum_token else " "
  
      for story_file in filelist:
          story = []
          summary = []
          reading_highlights = False
          for line in tf.gfile.Open(story_file, "rb"):
              line = text_encoder.to_unicode_utf8(line.strip())
              line = fix_run_on_sents(line)
              if not line:
                  continue
              elif line.startswith("@highlight"):
                  if not story:
                      break  # No article text.
                  reading_highlights = True
              elif reading_highlights:
                  summary.append(line)
              else:
                  story.append(line)
  
          if (not story) or not summary:
              continue
  
          yield " ".join(story) + story_summary_split_token + " ".join(
              summary
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import hashlib
  import io
  import os
  import random
  import tarfile
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.data_generators import wiki_lm
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling a global function with example usage: example_generator(all_files, urls_path, sum_token) and returns: unknown, line, line, line