code: def add_training_data_args(params, required=False):
      params.add_argument(
          C.TRAINING_ARG_SOURCE,
          "-s",
          required=required,
          type=regular_file(),
          help="Source side of parallel training data.",
      )
      params.add_argument(
          "--source-factors",
          "-sf",
          required=False,
          nargs="+",
          type=regular_file(),
          default=[],
          help="File(s) containing additional token-parallel source-side factors. Default: %(default)s.",
      )
      params.add_argument(
          "--source-factors-use-source-vocab",
          required=False,
          nargs="+",
          type=bool_str(),
          default=[],
          help="List of bools signaling whether to use the source vocabulary for the source factors. "
          "If empty (default) each factor has its own vocabulary.",
      )
      params.add_argument(
          "--target-factors",
          "-tf",
          required=False,
          nargs="+",
          type=regular_file(),
          default=[],
          help="File(s) containing additional token-parallel target-side factors. Default: %(default)s.",
      )
      params.add_argument(
          "--target-factors-use-target-vocab",
          required=False,
          nargs="+",
          type=bool_str(),
          default=[],
          help="List of bools signaling whether to use the target vocabulary for the target factors. "
          "If empty (default) each factor has its own vocabulary.",
      )
      params.add_argument(
          C.TRAINING_ARG_TARGET,
          "-t",
          required=required,
          type=regular_file(),
          help="Target side of parallel training data.",
      )
      params.add_argument(
          "--end-of-prepending-tag",
          type=str,
          default=None,
          help="Tag indicating the end of prepended text. Prepended tokens before this tag (inclusive) "
          "will be marked, and they will not be counted toward source length when calculating "
          "maximum output length for beam search.",
      )
  
imports: import argparse
  import os
  import sys
  import types
  from typing import Any, Callable, Dict, List, Tuple, Optional
  import yaml
  from sockeye.utils import smart_open
  from .None import constants
label_desc: Use image node_id 18 for calling a global function with example usage: add_training_data_args(params, required) without return types