code: def add_state_generation_args(params):
      add_training_data_args(params, required=True)
      add_vocab_args(params)
      add_device_args(params)
      add_batch_args(
          params,
          default_batch_size=56,
          default_batch_type=C.BATCH_TYPE_SENTENCE,
      )
  
      decode_params = params.add_argument_group(
          "Decoder state generation parameters"
      )
  
      params.add_argument(
          "--state-dtype",
          default=None,
          choices=[None, C.DTYPE_FP32, C.DTYPE_FP16],
          help="Data type of the decoder state store. Default: infers from saved model.",
      )
  
      params.add_argument(
          "--model",
          "-m",
          required=True,
          help="Model directory containing trained model.",
      )
  
      params.add_argument(
          C.TRAINING_ARG_MAX_SEQ_LEN,
          type=multiple_values(num_values=2, greater_or_equal=1),
          default=None,
          help="Maximum sequence length in tokens."
          'Use "x:x" to specify separate values for src&tgt. Default: Read from model.',
      )
  
      # common params with translate CLI
      add_length_penalty_args(params)
      add_brevity_penalty_args(params)
  
      params.add_argument(
          "--output-dir",
          "-o",
          default=None,
          help="The path to the directory that stores the decoder states.",
      )
  
      params.add_argument(
          "--dtype",
          default=None,
          choices=[None, C.DTYPE_FP32, C.DTYPE_FP16, C.DTYPE_INT8],
          help="Data type. Default: infers from saved model.",
      )
  
      add_logging_args(params)
  
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 35 for calling a global function with example usage: add_state_generation_args(params) without return types