code: def validate_arguments(args):
      """Validate input arguments"""
      io.validate((args.num_units, int, 1, None))
      io.validate((args.num_layers, int, 1, None))
      io.validate((args.num_encoder_layers, (int, type(None)), 0, None))
      io.validate((args.num_decoder_layers, (int, type(None)), 0, None))
      io.validate((args.num_embeddings_partitions, int, 0, None))
      io.validate((args.learning_rate, float, 0.0, None))
      io.validate((args.num_train_steps, int, 1, None))
      io.validate((args.warmup_steps, int, 0, args.num_train_steps))
      io.validate((args.init_weight, float))
      io.validate((args.src, (str, type(None)), 1, 256))
      io.validate((args.tgt, (str, type(None)), 1, 256))
      io.validate((args.sos, str, 1, 256))
      io.validate((args.eos, str, 1, 256))
      io.validate((args.src_max_len, int, 1, None))
      io.validate((args.tgt_max_len, int, 1, None))
      io.validate((args.src_max_len_infer, (int, type(None)), 1, None))
      io.validate((args.tgt_max_len_infer, (int, type(None)), 1, None))
      io.validate((args.forget_bias, float, 0.0, None))
      io.validate((args.dropout, float, 0.0, 1.0))
      io.validate((args.max_gradient_norm, float, 0.000000001, None))
      io.validate((args.batch_size, int, 1, None))
      io.validate((args.steps_per_stats, int, 1, None))
      io.validate((args.max_train, int, 0, None))
      io.validate((args.num_buckets, int, 1, None))
      io.validate((args.num_sampled_softmax, int, 0, None))
      io.validate((args.num_gpus, int, 0, None))
      io.validate((args.metrics, str, 1, 256))
      io.validate((args.inference_list, (str, type(None)), 0, 256))
      io.validate(
          (args.steps_per_external_eval, (int, type(None)), 1, None)
      )
      io.validate((args.scope, (str, type(None)), 1, 256))
      io.validate((args.random_seed, (int, type(None))))
      io.validate((args.num_keep_ckpts, int, 0, None))
      io.validate((args.infer_batch_size, int, 1, None))
      io.validate((args.beam_width, int, 0, None))
      io.validate((args.length_penalty_weight, float, 0.0, None))
      io.validate((args.sampling_temperature, float, 0.0, None))
      io.validate((args.num_translations_per_input, int, 1, None))
      io.validate((args.jobid, int, 0, None))
      io.validate((args.num_workers, int, 1, None))
      io.validate((args.num_inter_threads, int, 0, None))
      io.validate((args.num_intra_threads, int, 0, None))
      io.validate((args.pruning_hparams, (str, type(None)), 1, 256))
  
      suffixes = [args.src]
      if not args.language_model:
          suffixes.append(args.tgt)
  
      for suffix in suffixes:
          validate_existing_filepath(args.train_prefix, suffix)
          validate_existing_filepath(args.dev_prefix, suffix)
          validate_existing_filepath(args.test_prefix, suffix)
          validate_existing_filepath(args.vocab_prefix, suffix)
          validate_existing_filepath(args.embed_prefix, suffix)
      validate_existing_filepath(args.inference_ref_file)
      validate_existing_filepath(args.inference_input_file)
      validate_existing_filepath(args.hparams_path)
      validate_parent_exists(args.ckpt)
      validate_parent_exists(args.inference_output_file)
      validate_parent_exists(args.out_dir)
  
imports: from __future__ import print_function
  import argparse
  import os
  import random
  import sys
  import numpy
  import tensorflow
  from nlp_architect.utils import io
  from .None import inference
  from .None import train
  from .gnmt.utils import misc_utils, vocab_utils, evaluation_utils
label_desc: Use image node_id 7 for calling a global function with example usage: validate_arguments(args) without return types