code: def train(
      config: ConfigSchema,
      model: Optional[MultiRelationEmbedder] = None,
      trainer: Optional[AbstractBatchProcessor] = None,
      evaluator: Optional[AbstractBatchProcessor] = None,
      rank: Rank = SINGLE_TRAINER,
      subprocess_init: Optional[Callable[[], None]] = None,
  ) -> None:
      CoordinatorT = (
          GPUTrainingCoordinator
          if config.num_gpus > 0
          else TrainingCoordinator
      )
      coordinator = CoordinatorT(
          config, model, trainer, evaluator, rank, subprocess_init
      )
      coordinator.train()
      coordinator.close()
  
file_path: PyTorch-BigGraph/torchbiggraph/train.py
imports: import argparse
  import logging
  from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple
  from torchbiggraph.batching import AbstractBatchProcessor
  from torchbiggraph.config import add_to_sys_path, ConfigFileLoader, ConfigSchema
  from torchbiggraph.model import MultiRelationEmbedder
  from torchbiggraph.train_cpu import TrainingCoordinator
  from torchbiggraph.train_gpu import GPUTrainingCoordinator
  from torchbiggraph.types import Rank, SINGLE_TRAINER
  from torchbiggraph.util import set_logging_verbosity, setup_logging, SubprocessInitializer
label_desc: Use image node_id 1 for calling a global function with example usage: train(config, model, trainer, evaluator, rank, subprocess_init) without return types