code: def train_model(
      config: [str, Path, dict],
      install: bool = False,
      download: bool = False,
      recursive: bool = False,
  ) -> Chainer:
      train_evaluate_model_from_config(
          config,
          install=install,
          download=download,
          recursive=recursive,
      )
      return build_model(config, load_trained=True)
  
file_path: DeepPavlov/deeppavlov/__init__.py
imports: import sys
  from pathlib import Path
  from ._meta import __author__, __description__, __email__, __keywords__, __license__, __version__
  from .configs import configs
  from .core.commands.infer import build_model
  from .core.commands.train import train_evaluate_model_from_config
  from .core.common.base import Element, Model
  from .core.common.chainer import Chainer
  from .core.common.log import init_logger
  from .download import deep_download
label_desc: Use image node_id 1 for calling a global function with example usage: train_model(config, install, download, recursive) and returns: build_model