def METHOD_NAME(text_input, fn_origin=""):  # type: (Any, str) -> Any
    is_bytes = isinstance(text_input, (bytes, bytearray))
    taint_format_capture = TAINT_FORMAT_CAPTURE_BYTES if is_bytes else TAINT_FORMAT_CAPTURE
    taint_format_pattern = TAINT_FORMAT_PATTERN_BYTES if is_bytes else TAINT_FORMAT_PATTERN
    text_output = re.sub(  # type: ignore
        taint_format_capture, r"\2", text_input, flags=re.MULTILINE | re.DOTALL
    )  # type: Any
    if isinstance(text_input, bytearray):
        text_output = bytearray(text_output)  # type: ignore
    ranges_ = []  # type: List[TaintRange]
    acc_input_id = 0
    for i, match in enumerate(taint_format_pattern.finditer(text_input)):  # type: ignore[attr-defined]
        match_start = match.start() - (i * 6) - acc_input_id
        match_end = match.end() - ((i + 1) * 6) - acc_input_id
        match_group_1 = match.group(1)
        if match_group_1:
            len_input_id_token = len(match_group_1) + 2
            acc_input_id += 2 * len_input_id_token
            match_end -= 2 * len_input_id_token
        ranges_.append(
            TaintRange(
                match_start,
                match_end - match_start,
                Source(
                    str(match_group_1) if match_group_1 else DEFAULT_PARAMETER_NAME,
                    "sample_value",
                    OriginType.PARAMETER,
                ),
            )
        )
    taint_pyobject_with_ranges(
        text_output,
        ranges_,
    )
    return text_output