code: def verify_cli_args(
      config_path, output_dir, resume_path, epoch_resume
  ):
      if not config_path or (
          str(config_path) != "-" and not config_path.exists()
      ):
          msg.fail("Config file not found", config_path, exits=1)
      if output_dir.exists() and [p for p in output_dir.iterdir()]:
          if resume_path:
              msg.warn(
                  "Output directory is not empty.",
                  "If you're resuming a run in this directory, the old weights "
                  "for the consecutive epochs will be overwritten with the new ones.",
              )
          else:
              msg.warn(
                  "Output directory is not empty. ",
                  "It is better to use an empty directory or refer to a new output path, "
                  "then the new directory will be created for you.",
              )
      if resume_path is not None:
          if resume_path.is_dir():
              # This is necessary because Windows gives a Permission Denied when we
              # try to open the directory later, which is confusing. See #7878
              msg.fail(
                  "--resume-path should be a weights file, but {resume_path} is a directory.",
                  exits=True,
              )
          model_name = re.search(r"model\d+\.bin", str(resume_path))
          if not model_name and not epoch_resume:
              msg.fail(
                  "You have to use the --epoch-resume setting when using a renamed weight file for --resume-path",
                  exits=True,
              )
          elif not model_name and epoch_resume < 0:
              msg.fail(
                  f"The argument --epoch-resume has to be greater or equal to 0. {epoch_resume} is invalid",
                  exits=True,
              )
  
file_path: spacy/spacy/cli/pretrain.py
imports: import re
  from pathlib import Path
  from typing import Optional
  import typer
  from wasabi import msg
  from ..training.pretrain import pretrain
  from ..util import load_config
  from ._util import Arg, Opt, app, import_code, parse_config_overrides, setup_gpu, show_validation_error
label_desc: Use image node_id 2 for calling a global function with example usage: verify_cli_args(config_path, output_dir, resume_path, epoch_resume) without return types