code: def test_apply_replacements_to_text():
      # min_prob = 0.5
      # dp_data = None,
      # min_dp_score_per_symbol: float = -99.9
  
      # test more than one fragment to replace, test multiple same replacements
      text = "we began the further diversification of our revenue base with the protterra supply agreement and the navastar joint development agreement"
      replacements = [
          (66, 75, "proterra", 0.99986),
          (66, 75, "proterra", 0.9956),
          (101, 109, "navistar", 0.93),
          (101, 109, "navistar", 0.91),
          (101, 109, "navistar", 0.92),
      ]
      gold_text = "we began the further diversification of our revenue base with the proterra supply agreement and the navistar joint development agreement"
      corrected_text = apply_replacements_to_text(
          text,
          replacements,
          min_prob=0.5,
          replace_hyphen_to_space=False,
          dp_data=None,
      )
      assert corrected_text == gold_text
  
      # test that min_prob works
      gold_text = "we began the further diversification of our revenue base with the proterra supply agreement and the navastar joint development agreement"
      corrected_text = apply_replacements_to_text(
          text,
          replacements,
          min_prob=0.95,
          replace_hyphen_to_space=False,
          dp_data=None,
      )
      assert corrected_text == gold_text
  
file_path: NeMo/tests/collections/nlp/test_spellchecking_asr_customization.py
imports: import pytest
  from transformers import AutoTokenizer
  from nemo.collections.nlp.data.spellchecking_asr_customization.bert_example import BertExampleBuilder
  from nemo.collections.nlp.data.spellchecking_asr_customization.utils import apply_replacements_to_text, substitute_replacements_in_text
label_desc: Use image node_id 2 for calling a global function with example usage: test_apply_replacements_to_text() without return types