code: def test_substitute_replacements_in_text():
      text = "we began the further diversification of our revenue base with the protterra supply agreement and the navastar joint development agreement"
      replacements = [
          (66, 75, "pro-terra", 0.99986),
          (101, 109, "navistar", 0.996),
      ]
      gold_text = "we began the further diversification of our revenue base with the pro-terra supply agreement and the navistar joint development agreement"
      corrected_text = substitute_replacements_in_text(
          text, replacements, replace_hyphen_to_space=False
      )
      assert corrected_text == gold_text
  
      gold_text_no_hyphen = "we began the further diversification of our revenue base with the pro terra supply agreement and the navistar joint development agreement"
      corrected_text = substitute_replacements_in_text(
          text, replacements, replace_hyphen_to_space=True
      )
      assert corrected_text == gold_text_no_hyphen
  
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 1 for calling a global function with example usage: test_substitute_replacements_in_text() without return types