code: def add_batch_args(
      params,
      default_batch_size=4096,
      default_batch_type=C.BATCH_TYPE_WORD,
  ):
      params.add_argument(
          "--batch-size",
          "-b",
          type=int_greater_or_equal(1),
          default=default_batch_size,
          help="Mini-batch size per process. Depending on --batch-type, this either refers to words or "
          "sentences. The effective batch size (update size) is num_processes * batch_size * "
          "update_interval. Default: %(default)s.",
      )
      params.add_argument(
          "--batch-type",
          type=str,
          default=default_batch_type,
          choices=C.BATCH_TYPES,
          help="sentence: each batch contains exactly X sentences. "
          "word: each batch contains approximately X target words. "
          "max-word: each batch contains at most X target words. "
          "Default: %(default)s.",
      )
      params.add_argument(
          "--batch-sentences-multiple-of",
          type=int,
          default=8,
          help="For word and max-word batching, guarantee that each batch contains a multiple of X "
          "sentences. For word batching, round up or down to nearest multiple. For max-word "
          "batching, always round down. Default: %(default)s.",
      )
      params.add_argument(
          "--update-interval",
          type=int,
          default=1,
          help="Accumulate gradients over X batches for each model update. Set a value higher than 1 to "
          "simulate large batches (ex: batch_size 2560 with update_interval 4 gives effective batch "
          "size 10240). 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 29 for calling a global function with example usage: add_batch_args(params, default_batch_size, default_batch_type) without return types