code: def extract_src_tgt_corpus(
      compressed_data_path,
      data_lang_pair,
      src_lang,
      tgt_lang,
      src_name,
      tgt_name,
      src_tgt_name,
      out_src_path,
      out_tgt_path,
  ):
      data_src_lang, data_tgt_lang = split_lang_pair(data_lang_pair)
      if not (
          (src_lang == data_src_lang and tgt_lang == data_tgt_lang)
          or (src_lang == data_tgt_lang and tgt_lang == data_src_lang)
      ):
          raise ValueError(
              "Mismatch src/tgt language. Required pair={}, Given src={}, tgt={}".format(
                  data_lang_pair, src_lang, tgt_lang
              )
          )
      reverse_pair = (src_lang == data_tgt_lang) and (
          tgt_lang == data_src_lang
      )
      if src_tgt_name is not None:
          assert src_name is None and tgt_name is None
      tmp_dir = os.path.join(
          os.path.dirname(compressed_data_path), "raw_data"
      )
      if not os.path.exists(tmp_dir):
          os.makedirs(tmp_dir)
      # Uncompress data
      if compressed_data_path.endswith(
          ".tar.gz"
      ) or compressed_data_path.endswith(".tgz"):
          with tarfile.open(compressed_data_path) as f:
              if src_tgt_name is None:
                  f.extract(src_name, tmp_dir)
                  f.extract(tgt_name, tmp_dir)
              else:
                  f.extract(
                      src_tgt_name, os.path.join(tmp_dir, src_tgt_name)
                  )
      elif compressed_data_path.endswith(".gz"):
          assert src_tgt_name is not None
          with gzip.open(compressed_data_path) as f_in:
              with open(
                  os.path.join(tmp_dir, src_tgt_name), "wb"
              ) as f_out:
                  shutil.copyfileobj(f_in, f_out)
      elif compressed_data_path.endswith(".zip"):
          with zipfile.ZipFile(compressed_data_path) as zip_handler:
              if src_tgt_name is None:
                  with zip_handler.open(src_name) as f_in:
                      with open(
                          os.path.join(tmp_dir, src_name), "wb"
                      ) as f_out:
                          shutil.copyfileobj(f_in, f_out)
                  with zip_handler.open(tgt_name) as f_in:
                      with open(
                          os.path.join(tmp_dir, tgt_name), "wb"
                      ) as f_out:
                          shutil.copyfileobj(f_in, f_out)
              else:
                  with zip_handler.open(src_tgt_name) as f_in:
                      with open(
                          os.path.join(tmp_dir, src_tgt_name), "wb"
                      ) as f_out:
                          shutil.copyfileobj(f_in, f_out)
      else:
          raise NotImplementedError(
              "Cannot process {}".format(compressed_data_path)
          )
      # Parse data and move to the required src/tgt path
      if src_tgt_name is None:
          if src_name.endswith(".sgm"):
              parse_sgm(os.path.join(tmp_dir, src_name), out_src_path)
              parse_sgm(os.path.join(tmp_dir, tgt_name), out_tgt_path)
          else:
              shutil.copyfile(
                  os.path.join(tmp_dir, src_name), out_src_path
              )
              shutil.copyfile(
                  os.path.join(tmp_dir, tgt_name), out_tgt_path
              )
      else:
          if src_tgt_name.endswith(".tmx"):
              parse_paracrawl_tmx(
                  os.path.join(tmp_dir, src_tgt_name),
                  src_lang=src_lang,
                  tgt_lang=tgt_lang,
                  out_src_path=out_src_path,
                  out_tgt_path=out_tgt_path,
                  clean_space=True,
                  filter_profanity=False,
              )
          elif src_tgt_name.endswith(".tsv"):
              if reverse_pair:
                  parse_tsv(
                      os.path.join(tmp_dir, src_tgt_name),
                      out_tgt_path,
                      out_src_path,
                  )
              else:
                  parse_tsv(
                      os.path.join(tmp_dir, src_tgt_name),
                      out_src_path,
                      out_tgt_path,
                  )
          else:
              raise NotImplementedError
      # Clean-up
      shutil.rmtree(tmp_dir)
  
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 11 for calling a global function with example usage: extract_src_tgt_corpus(compressed_data_path, data_lang_pair, src_lang, tgt_lang, src_name, tgt_name, src_tgt_name, out_src_path, out_tgt_path) without return types