code: def validate_preprocessing_args(args):
      if (
          not (
              (
                  getattr(args, "train_source_text_file", None)
                  or getattr(args, "train_source_binary_path", None)
                  or getattr(
                      args, "multiling_train_source_text_file", None
                  )
                  or getattr(args, "multilingual_train_text_file", None)
                  or getattr(
                      args, "multilingual_train_binary_path", None
                  )
              )
              and (
                  getattr(args, "train_target_text_file", None)
                  or getattr(args, "train_target_binary_path", None)
                  or getattr(
                      args, "multiling_train_target_text_file", None
                  )
                  or getattr(args, "multilingual_train_text_file", None)
                  or getattr(
                      args, "multilingual_train_binary_path", None
                  )
              )
              and (
                  getattr(args, "eval_source_text_file", None)
                  or getattr(args, "eval_source_binary_path", None)
                  or getattr(
                      args, "multiling_eval_source_text_file", None
                  )
                  or getattr(args, "multilingual_eval_text_file", None)
                  or getattr(
                      args, "multilingual_eval_binary_path", None
                  )
              )
              and (
                  getattr(args, "eval_target_text_file", None)
                  or getattr(args, "eval_target_binary_path", None)
                  or getattr(
                      args, "multiling_eval_target_text_file", None
                  )
                  or getattr(args, "multilingual_eval_text_file", None)
                  or getattr(
                      args, "multilingual_eval_binary_path", None
                  )
              )
          )
          and args.task != "dual_learning_task"
      ):
          raise ValueError(
              "At least one of --*_text_file or --*_binary_path flags must be "
              "specified for each of --{train, eval}_{source, target}_*"
          )
  
      for file_type in (
          "train_source_text_file",
          "train_target_text_file",
          "eval_source_text_file",
          "eval_target_text_file",
      ):
          text_file = getattr(args, file_type)
          if text_file and not os.path.isfile(text_file):
              raise ValueError(
                  f"Please specify an existing text file for "
                  f"--{file_type}={text_file}"
              )
  
      for file_type in ("source_vocab_file", "target_vocab_file"):
          vocab_file = getattr(args, file_type)
          if not vocab_file:
              raise ValueError(
                  f"--{file_type} must be specified - even if you don't have "
                  f"a vocab file, you must still specify a location "
                  f"for it to be written to."
              )
  
      if args.task == constants.SEMI_SUPERVISED_TASK and not (
          getattr(args, "train_mono_source_binary_path", None)
          or getattr(args, "train_mono_target_binary_path", None)
          or getattr(args, "train_mono_source_text_file", None)
      ):
          raise ValueError(
              "For semisupervised training, at least one of --*_text_file or "
              "--*_binary_path flags must be specified for at least one of "
              "--train_mono_{source, target}_*"
          )
  
          for file_type in (
              "train_mono_source_text_file",
              "train_mono_target_text_file",
          ):
              file_path = getattr(args, file_type)
              if file_path and not os.path.isfile(file_path):
                  raise ValueError(
                      f"Please specify an existing text file for --{file_type}="
                      f"{file_path}"
                  )
  
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 4 for calling a global function with example usage: validate_preprocessing_args(args) without return types