code: def _wiki_articles(shard_id, wikis_dir=None):
      """Generates WikipediaArticles from GCS that are part of shard shard_id."""
      if not wikis_dir:
          wikis_dir = WIKI_CONTENT_DIR
      with tf.Graph().as_default():
          dataset = tf.data.TFRecordDataset(
              cc_utils.readahead(
                  os.path.join(wikis_dir, WIKI_CONTENT_FILE % shard_id)
              ),
              buffer_size=16 * 1000 * 1000,
          )
  
          def _parse_example(ex_ser):
              """Parse serialized Example containing Wikipedia article content."""
              features = {
                  "url": tf.VarLenFeature(tf.string),
                  "title": tf.VarLenFeature(tf.string),
                  "section_titles": tf.VarLenFeature(tf.string),
                  "section_texts": tf.VarLenFeature(tf.string),
              }
              ex = tf.parse_single_example(ex_ser, features)
              for k in ex.keys():
                  ex[k] = ex[k].values
              ex["url"] = ex["url"][0]
              ex["title"] = ex["title"][0]
              return ex
  
          dataset = dataset.map(_parse_example, num_parallel_calls=32)
          dataset = dataset.prefetch(100)
          record_it = dataset.make_one_shot_iterator().get_next()
  
          with tf.Session() as sess:
              while True:
                  try:
                      ex = sess.run(record_it)
                  except tf.errors.OutOfRangeError:
                      break
  
                  sections = [
                      WikipediaSection(
                          title=text_encoder.to_unicode(title),
                          text=text_encoder.to_unicode(text),
                      )
                      for title, text in zip(
                          ex["section_titles"], ex["section_texts"]
                      )
                  ]
                  yield WikipediaArticle(
                      url=text_encoder.to_unicode(ex["url"]),
                      title=text_encoder.to_unicode(ex["title"]),
                      sections=sections,
                  )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import json
  import math
  import os
  import re
  import string
  import tempfile
  import six
  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 tokenizer
  from tensor2tensor.data_generators.wikisum import utils
  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 8 for calling a global function with example usage: _wiki_articles(shard_id, wikis_dir) and returns: ex