code: def concatenate_files(
      fname_l: List[str],
      out_fname: Optional[str] = None,
      chunk_size: int = 128 * 1024,
  ) -> str:
      """Concatenate multiple files into a single file. This is used to recover a large file that has
      been split into multiple parts. E.g.,
  
      UNv1.0.en-zh.tar.gz.00, UNv1.0.en-zh.tar.gz.01 --> UNv1.0.en-zh.tar.gz
  
      Parameters
      ----------
      fname_l
      out_fname
      chunk_size
  
      Returns
      -------
      ret
      """
      assert len(fname_l) > 1
      ext_l = []
      base_prefix, ext = os.path.splitext(fname_l[0])
      ext_l.append(ext)
      for i in range(1, len(fname_l)):
          prefix, ext = os.path.splitext(fname_l[i])
          ext_l.append(ext)
          if prefix != base_prefix:
              raise ValueError(
                  "Cannot concatenate the input files! The prefix does not match! "
                  "Find prefix={}, Expected prefix={}".format(
                      prefix, base_prefix
                  )
              )
      fname_ext_l = sorted(zip(fname_l, ext_l), key=lambda ele: ele[1])
      if out_fname is None:
          out_fname = base_prefix
      with open(out_fname, "wb") as of:
          for fname, _ in fname_ext_l:
              with open(fname, "rb") as infile:
                  for block in iter(
                      functools.partial(infile.read, chunk_size), b""
                  ):
                      of.write(block)
      return out_fname
  
imports: from typing import List, Union, IO, AnyStr, Tuple, Optional
  import re
  import os
  import argparse
  import zipfile
  import shutil
  import functools
  import tarfile
  import gzip
  import json
  from xml.etree import ElementTree
  from gluonnlp.data.filtering import ProfanityFilter
  from gluonnlp.utils.misc import file_line_number, download, load_checksum_stats
  from gluonnlp.base import get_data_home_dir, get_repo_url
label_desc: Use image node_id 8 for calling a global function with example usage: concatenate_files(fname_l, out_fname, chunk_size) and returns: out_fname