code: def add_vocab_args(params):
      params.add_argument(
          "--source-vocab",
          required=False,
          default=None,
          help="Existing source vocabulary (JSON).",
      )
      params.add_argument(
          "--target-vocab",
          required=False,
          default=None,
          help="Existing target vocabulary (JSON).",
      )
      params.add_argument(
          "--source-factor-vocabs",
          required=False,
          nargs="+",
          type=regular_file(),
          default=[],
          help="Existing source factor vocabulary (-ies) (JSON).",
      )
      params.add_argument(
          "--target-factor-vocabs",
          required=False,
          nargs="+",
          type=regular_file(),
          default=[],
          help="Existing target factor vocabulary (-ies) (JSON).",
      )
      params.add_argument(
          C.VOCAB_ARG_SHARED_VOCAB,
          action="store_true",
          default=False,
          help="Share source and target vocabulary. "
          "Will be automatically turned on when using weight tying. Default: %(default)s.",
      )
      params.add_argument(
          "--num-words",
          type=multiple_values(num_values=2, greater_or_equal=0),
          default=(0, 0),
          help='Maximum vocabulary size. Use "x:x" to specify separate values for src&tgt. '
          "A value of 0 indicates that the vocabulary unrestricted and determined from the data by "
          "creating an entry for all words that occur at least --word-min-count times."
          "Default: %(default)s.",
      )
      params.add_argument(
          "--word-min-count",
          type=multiple_values(num_values=2, greater_or_equal=1),
          default=(1, 1),
          help="Minimum frequency of words to be included in vocabularies. Default: %(default)s.",
      )
      params.add_argument(
          "--pad-vocab-to-multiple-of",
          type=int,
          default=8,
          help="Pad vocabulary to a multiple of this integer. Default: %(default)s.",
      )
  
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 27 for calling a global function with example usage: add_vocab_args(params) without return types