code: def write_raw_text_to_files(
      all_files, urls_path, dataset_split, tmp_dir
  ):
      """Write text to files."""
  
      def write_to_file(all_files, urls_path, tmp_dir, filename):
          """Write text to files."""
          with io.open(
              os.path.join(tmp_dir, filename + ".source"),
              "w",
              encoding="utf-8",
          ) as fstory:
              with io.open(
                  os.path.join(tmp_dir, filename + ".target"),
                  "w",
                  encoding="utf-8",
              ) as fsummary:
                  for example in example_generator(
                      all_files, urls_path, sum_token=True
                  ):
                      story, summary = _story_summary_split(example)
                      fstory.write(story + "\n")
                      fsummary.write(summary + "\n")
  
      if dataset_split == problem.DatasetSplit.TRAIN:
          filename = "cnndm.train"
      elif dataset_split == problem.DatasetSplit.EVAL:
          filename = "cnndm.dev"
      else:
          filename = "cnndm.test"
  
      tf.logging.info("Writing %s" % filename)
      write_to_file(all_files, urls_path, tmp_dir, filename)
  
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 5 for calling a global function with example usage: write_raw_text_to_files(all_files, urls_path, dataset_split, tmp_dir) without return types