def METHOD_NAME(value: str) -> str:
    parts = iter(pattern.split(value))
    out = []
    for part in parts:
        out.append(unquote(part, "utf-8", "werkzeug.url_quote"))
        out.append(next(parts, ""))
    return "".join(out)