code: def check_args(args):
      # assert args.path is not None, "--path required for generation!"
      # assert args.results_path is not None, "--results_path required for generation!"
      assert (
          not args.sampling or args.nbest == args.beam
      ), "--sampling requires --nbest to be equal to --beam"
      assert (
          args.replace_unk is None or args.raw_text
      ), "--replace-unk requires a raw text dataset (--raw-text)"
  
imports: import ast
  import logging
  import math
  import os
  import sys
  import editdistance
  import numpy
  import torch
  from fairseq import checkpoint_utils, options, progress_bar, tasks, utils
  from fairseq.data.data_utils import post_process
  from fairseq.logging.meters import StopwatchMeter, TimeMeter
label_desc: Use image node_id 2 for calling a global function with example usage: check_args(args) without return types