code: def main(cfg: DictConfig) -> None:
      # PTL 2.0 has find_unused_parameters as False by default, so its required to set it to True
      # when there are unused parameters like here
      if cfg.trainer.strategy == "ddp":
          cfg.trainer.strategy = "ddp_find_unused_parameters_true"
      logging.info(f"Config Params: {OmegaConf.to_yaml(cfg)}")
  
      # Train the model
      if cfg.model.do_training:
          logging.info(
              "================================================================================================"
          )
          logging.info("Start training...")
          trainer, model = instantiate_model_and_trainer(
              cfg, MODEL, True
          )
          spellchecking_exp_manager = cfg.get("exp_manager", None)
          exp_manager(trainer, spellchecking_exp_manager)
          trainer.fit(model)
          logging.info("Training finished!")
  
imports: from helpers import MODEL, instantiate_model_and_trainer
  from omegaconf import DictConfig, OmegaConf
  from nemo.core.config import hydra_runner
  from nemo.utils import logging
  from nemo.utils.exp_manager import exp_manager
label_desc: Use image node_id 1 for calling a global function with example usage: main(cfg) without return types