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: {OmegaConf.to_yaml(cfg)}")
      trainer = pl.Trainer(**cfg.trainer)
      exp_manager_cfg = cfg.get("exp_manager", None)
  
      if exp_manager_cfg:
          exp_manager_cfg.name = cfg.model.task_name
          logging.info(
              f"Setting task_name to {exp_manager_cfg.name} in exp_manager"
          )
      exp_manager(trainer, exp_manager_cfg)
  
      if cfg.model.nemo_path and os.path.exists(cfg.model.nemo_path):
          model = GLUEModel.restore_from(cfg.model.nemo_path)
          logging.info(f"Restoring model from {cfg.model.nemo_path}")
          model.update_data_dir(data_dir=cfg.model.dataset.data_dir)
          model.setup_training_data()
          model.setup_multiple_validation_data()
          trainer.fit(model)
      else:
          model = GLUEModel(cfg.model, trainer=trainer)
          trainer.fit(model)
          if cfg.model.nemo_path:
              model.save_to(cfg.model.nemo_path)
  
imports: import os
  import pytorch_lightning
  from omegaconf import DictConfig, OmegaConf
  from nemo.collections.nlp.models import GLUEModel
  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