      train(config_path, output_path, use_gpu=use_gpu, overrides=overrides)
  
  
  def train(
      config_path: Path,
      output_path: Optional[Path] = None,
      *,
      use_gpu: int = -1,
      overrides: Dict[str, Any] = util.SimpleFrozenDict(),
  ):
      # Make sure all files and paths exists if they are needed
 
</s> remove from typing import Optional, Dict, Any
 </s> add from typing import Optional, Dict, Any, Union
    config_path: Union[str, Path],
    output_path: Optional[Union[str, Path]] = None,
      train(config_path, output_path, use_gpu=use_gpu, overrides=overrides)
  
  
  def train(
    config_path: Union[str, Path],
    output_path: Optional[Union[str, Path]] = None,
    config_path: Union[str, Path],
    output_path: Optional[Union[str, Path]] = None,
      *,
      use_gpu: int = -1,
      overrides: Dict[str, Any] = util.SimpleFrozenDict(),
  ):
      # Make sure all files and paths exists if they are needed
keep keep keep keep replace replace keep keep keep keep keep
 Add docs section for spacy.cli.train.train (#9545)

* Add section for spacy.cli.train.train

* Add link from training page to train function

* Ensure path in train helper

* Update docs

Co-authored-by: Ines Montani <ines@ines.io> 
spacy/cli/train.py