code: def check_unsupported_fairseq_flags(args):
      UNSUPPORTED_FAIRSEQ_FLAGS = [
          # Use --save-interval-updates instead.
          ("save_interval", 1),
          # Look at --num-avg-checkpoints and --auto-clear-checkpoints.
          ("keep_interval_updates", -1),
          # We always save checkpoints at the end of an epoch.
          ("no_epoch_checkpoints", False),
          # We always save checkpoints.
          ("no_save", False),
          # We run validation every time we save a checkpoint, so this is effectively
          # controlled by --save-interval-updates as well.
          ("validate_interval", 1),
      ]
  
      for flag_name, default_value in UNSUPPORTED_FAIRSEQ_FLAGS:
          if hasattr(args, flag_name):
              if getattr(args, flag_name) != default_value:
                  raise ValueError(
                      f"Found unsupported Fairseq flag "
                      f"--{flag_name.replace('_', '-')} with non-default value "
                      f"of {getattr(args, flag_name)} "
                  )
              setattr(args, flag_name, None)
  
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 1 for calling a global function with example usage: check_unsupported_fairseq_flags(args) without return types