code: def validate_generation_args(args):
      assert args.unkpen == 0, (
          "PyTorch Translate does not use fairseq's --unkpen flag. "
          "Use --unk-reward instead, and check the flag description regarding "
          "sign polarity meaning."
      )
      assert args.lenpen == 1, (
          "Argument --lenpen is IGNORED by pytorch_translate. Use "
          "--length-penalty instead."
      )
      if "num_avg_checkpoints" in args:
          assert (
              args.num_avg_checkpoints >= 1
          ), "--num-avg-checkpoints must be >= 1."
  
file_path: translate/pytorch_translate/options.py
imports: import os
  import torch
  from fairseq.data.indexed_dataset import get_available_dataset_impl
  from pytorch_translate import constants, utils
label_desc: Use image node_id 8 for calling a global function with example usage: validate_generation_args(args) without return types