docs: def replace_multiple_in_file(filename: str,
                               replacements: List[Tuple[str, str]]) -> None:
      """
      Replaces multiple from/to string pairs within a single file.
  
      Args:
          filename: filename to process (modifying it in place)
          replacements: list of ``(from_text, to_text)`` tuples
      """
      with open(filename) as infile:
          contents = infile.read()
      for text_from, text_to in replacements:
          log.info("Amending {}: {} -> {}",
                   filename, repr(text_from), repr(text_to))
          contents = contents.replace(text_from, text_to)
      with open(filename, 'w') as outfile:
          outfile.write(contents)