code: def main(cfg):
      logging.info(f"Hydra config: {OmegaConf.to_yaml(cfg)}")
  
      trainer = pl.Trainer(**cfg.trainer)
      exp_manager(trainer, cfg.get("exp_manager", None))
  
      if (
          hasattr(cfg, "init_from_ptl_ckpt")
          and cfg.init_from_ptl_ckpt is not None
      ):
          raise NotImplementedError(
              "Currently for simplicity of single script for all model types, we only support `init_from_nemo_model` and `init_from_pretrained_model`"
          )
  
      asr_model = get_base_model(trainer, cfg)
  
      # Check vocabulary type and update if needed
      asr_model = check_vocabulary(asr_model, cfg)
  
      # Setup Data
      asr_model = setup_dataloaders(asr_model, cfg)
  
      # Setup Optimizer
      asr_model.setup_optimization(cfg.model.optim)
  
      # Setup SpecAug
      if (
          hasattr(cfg.model, "spec_augment")
          and cfg.model.spec_augment is not None
      ):
          asr_model.spec_augment = ASRModel.from_config_dict(
              cfg.model.spec_augment
          )
  
      trainer.fit(asr_model)
  
file_path: NeMo/examples/asr/speech_to_text_finetune.py
imports: import time
  import pytorch_lightning
  from omegaconf import OmegaConf
  from nemo.collections.asr.models import ASRModel
  from nemo.core.config import hydra_runner
  from nemo.utils import logging, model_utils
  from nemo.utils.exp_manager import exp_manager
  from nemo.utils.get_rank import is_global_rank_zero
label_desc: Use image node_id 5 for calling a global function with example usage: main(cfg) without return types