code: def train_cli(
      # fmt: off
      ctx: typer.Context,  # This is only used to read additional arguments
      config_path: Path = Arg(..., help="Path to config file", exists=True, allow_dash=True),
      output_path: Optional[Path] = Opt(None, "--output", "--output-path", "-o", help="Output directory to store trained pipeline in"),
      code_path: Optional[Path] = Opt(None, "--code", "-c", help="Path to Python file with additional code (registered functions) to be imported"),
      verbose: bool = Opt(False, "--verbose", "-V", "-VV", help="Display more information for debugging purposes"),
      use_gpu: int = Opt(-1, "--gpu-id", "-g", help="GPU ID or -1 for CPU")
      # fmt: on
  ):
      """
      Train or update a spaCy pipeline. Requires data in spaCy's binary format. To
      convert data from other formats, use the `spacy convert` command. The
      config file includes all settings and hyperparameters used during training.
      To override settings in the config, e.g. settings that point to local
      paths or that you want to experiment with, you can override them as
      command line options. For instance, --training.batch_size 128 overrides
      the value of "batch_size" in the block "[training]". The --code argument
      lets you pass in a Python file that's imported before training. It can be
      used to register custom functions and architectures that can then be
      referenced in the config.
  
      DOCS: https://spacy.io/api/cli#train
      """
      if verbose:
          util.logger.setLevel(logging.DEBUG)
      overrides = parse_config_overrides(ctx.args)
      import_code(code_path)
      train(
          config_path, output_path, use_gpu=use_gpu, overrides=overrides
      )
  
file_path: spacy/spacy/cli/train.py
imports: import logging
  import sys
  from pathlib import Path
  from typing import Any, Dict, Optional, Union
  import typer
  from wasabi import msg
  from ..None import util
  from ..training.initialize import init_nlp
  from ..training.loop import train
  from ._util import Arg, Opt, app, import_code, parse_config_overrides, setup_gpu, show_validation_error
label_desc: Use image node_id 1 for calling a global function with example usage: train_cli(ctx, config_path, output_path, code_path, verbose, use_gpu) without return types