code: def extract_files(full_name, output_dir, shuffle=False):
      """
      Extract the file and concatenate all the TXT files it archives
      """
      if not full_name.endswith(".xz"):
          return
      file_prefix = re.split(r"\.|/", full_name)[-2]
      file_prefix = file_prefix.replace(
          "urlsf_subset", "openwebtext-prepared-"
      )
      with open(
          "{}.txt".format(os.path.join(output_dir, file_prefix)), "w"
      ) as fp:
          with tarfile.open(full_name) as t:
              txt_names = t.getnames()
              if shuffle:
                  random.shuffle(txt_names)
              for txt_name in txt_names:
                  f = t.extractfile(txt_name)
                  for line in f.readlines():
                      # skip empty line
                      line = line.strip()
                      if line:
                          fp.write(line.decode() + "\n")
                  # Two extra line break to mark the document separation
                  fp.write("\n")
  
file_path: gluon-nlp/scripts/datasets/pretrain_corpus/prepare_openwebtext.py
imports: import os
  import re
  import time
  import random
  import tarfile
  import argparse
  import functools
  import multiprocessing
label_desc: Use image node_id 2 for calling a global function with example usage: extract_files(full_name, output_dir, shuffle) without return types