code: def main(cfg: DictConfig) -> None:
      lang = cfg.lang
  
      if cfg.tagger_pretrained_model:
          tagger_trainer, tagger_model = instantiate_model_and_trainer(
              cfg, TAGGER_MODEL, False
          )
          tagger_model.max_sequence_len = 512
          tagger_model.setup_test_data(cfg.data.test_ds)
          logging.info("Evaluating the tagger...")
          tagger_trainer.test(model=tagger_model, verbose=False)
      else:
          logging.info(
              "Tagger checkpoint is not provided, skipping tagger evaluation"
          )
  
      if cfg.decoder_pretrained_model:
          (
              decoder_trainer,
              decoder_model,
          ) = instantiate_model_and_trainer(cfg, DECODER_MODEL, False)
          decoder_model.max_sequence_len = 512
          decoder_model.setup_multiple_test_data(cfg.data.test_ds)
          logging.info("Evaluating the decoder...")
          decoder_trainer.test(decoder_model)
      else:
          logging.info(
              "Decoder checkpoint is not provided, skipping decoder evaluation"
          )
  
      if cfg.tagger_pretrained_model and cfg.decoder_pretrained_model:
          logging.info(
              "Running evaluation of the duplex model (tagger + decoder) on the test set."
          )
          tn_model = DuplexTextNormalizationModel(
              tagger_model, decoder_model, lang
          )
          test_dataset = TextNormalizationTestDataset(
              cfg.data.test_ds.data_path, cfg.mode, lang
          )
          results = tn_model.evaluate(
              test_dataset,
              cfg.data.test_ds.batch_size,
              cfg.data.test_ds.errors_log_fp,
          )
          print(f"\nTest results: {results}")
  
imports: from helpers import DECODER_MODEL, TAGGER_MODEL, instantiate_model_and_trainer
  from omegaconf import DictConfig
  from nemo.collections.nlp.data.text_normalization import TextNormalizationTestDataset
  from nemo.collections.nlp.models import DuplexTextNormalizationModel
  from nemo.core.config import hydra_runner
  from nemo.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: main(cfg) without return types