def apply_text_replacements(path, text, text_replacements):
    """
        If path appears in text_replacements, replace each old value with new value in order.
    """
    if path in text_replacements:
        for old_val, new_val in text_replacements[path]:
            text = text.replace(old_val, new_val)
    return text