code: def preprocess_iwslt17(
      root: str,
      src: str,
      tgt: str,
      bpe_size: Optional[int],
      need_chars: bool,
      bbpe_size: Optional[int],
      need_bytes: bool,
  ):
      # extract bitext
      in_root = op.join(root, f"{src}-{tgt}")
      for lang in [src, tgt]:
          _convert_train(
              op.join(in_root, f"train.tags.{src}-{tgt}.{lang}"),
              op.join(root, f"train.{lang}"),
          )
          _convert_xml(
              op.join(
                  in_root, f"IWSLT17.TED.dev2010.{src}-{tgt}.{lang}.xml"
              ),
              op.join(root, f"valid.{lang}"),
          )
          _convert_xml(
              op.join(
                  in_root, f"IWSLT17.TED.tst2015.{src}-{tgt}.{lang}.xml"
              ),
              op.join(root, f"test.{lang}"),
          )
      # pre-tokenize
      for lang in [src, tgt]:
          for split in SPLITS:
              pretokenize(
                  op.join(root, f"{split}.{lang}"),
                  op.join(root, f"{split}.moses.{lang}"),
                  src,
                  tgt,
              )
      # tokenize with BPE vocabulary
      if bpe_size is not None:
          # learn vocabulary
          concated_train_path = op.join(root, "train.all")
          _concat_files(
              [
                  op.join(root, "train.moses.fr"),
                  op.join(root, "train.moses.en"),
              ],
              concated_train_path,
          )
          bpe_model_prefix = op.join(root, f"spm_bpe{bpe_size}")
          _get_bpe(concated_train_path, bpe_model_prefix, bpe_size)
          os.remove(concated_train_path)
          # apply
          for lang in [src, tgt]:
              for split in SPLITS:
                  _apply_bpe(
                      bpe_model_prefix + ".model",
                      op.join(root, f"{split}.moses.{lang}"),
                      op.join(
                          root, f"{split}.moses.bpe{bpe_size}.{lang}"
                      ),
                  )
      # tokenize with bytes vocabulary
      if need_bytes:
          for lang in [src, tgt]:
              for split in SPLITS:
                  _get_bytes(
                      op.join(root, f"{split}.moses.{lang}"),
                      op.join(root, f"{split}.moses.bytes.{lang}"),
                  )
      # tokenize with characters vocabulary
      if need_chars:
          for lang in [src, tgt]:
              for split in SPLITS:
                  _get_chars(
                      op.join(root, f"{split}.moses.{lang}"),
                      op.join(root, f"{split}.moses.chars.{lang}"),
                  )
      # tokenize with byte-level BPE vocabulary
      if bbpe_size is not None:
          # learn vocabulary
          bchar_path = op.join(root, "train.bchar")
          _convert_to_bchar(
              op.join(root, "train.moses"), src, tgt, bchar_path
          )
          bbpe_model_prefix = op.join(root, f"spm_bbpe{bbpe_size}")
          _get_bpe(bchar_path, bbpe_model_prefix, bbpe_size)
          os.remove(bchar_path)
          # apply
          for lang in [src, tgt]:
              for split in SPLITS:
                  _apply_bbpe(
                      bbpe_model_prefix + ".model",
                      op.join(root, f"{split}.moses.{lang}"),
                      op.join(
                          root, f"{split}.moses.bbpe{bbpe_size}.{lang}"
                      ),
                  )
  
imports: import argparse
  import os
  import os.path
  from collections import namedtuple
  from multiprocessing import cpu_count
  from typing import List, Optional
  import sentencepiece
  from fairseq.data.encoders.byte_bpe import ByteBPE
  from fairseq.data.encoders.byte_utils import byte_encode
  from fairseq.data.encoders.bytes import Bytes
  from fairseq.data.encoders.characters import Characters
  from fairseq.data.encoders.moses_tokenizer import MosesTokenizer
  from fairseq.data.encoders.sentencepiece_bpe import SentencepieceBPE
label_desc: Use image node_id 11 for calling a global function with example usage: preprocess_iwslt17(root, src, tgt, bpe_size, need_chars, bbpe_size, need_bytes) without return types