def METHOD_NAME():
    new_formula = FormulaHandler.rename_field_references_in_formula_string(
        "field_by_id(1)",
        {},
        field_ids_to_replace_with_name_refs={1: "test with ' '", 2: "other_test"},
    )
    assert new_formula == "field('test with \\' \\'')"