def METHOD_NAME(source_script_lines: List[str], transformed_nodes: List[Tuple[ast.AST, ast.AST]]) -> List[str]:
    """Replaces all the nodes present in `transformed_nodes` in the `script_lines`. The `transformed_nodes` is a tuple where the first element
    is must be a node with full location information created out of `script_lines`"""
    script_lines: List[str] = []
    last_line = -1
    last_offset = -1
    # sort transformed nodes by line and offset
    for node, t_value in sorted(transformed_nodes, key=lambda n: (n[0].lineno, n[0].col_offset)):
        # do we have a line changed
        if last_line != node.lineno - 1:
            # add remainder from the previous line
            if last_offset >= 0:
                script_lines.append(source_script_lines[last_line][last_offset:])
            # add all new lines from previous line to current
            script_lines.extend(source_script_lines[last_line+1:node.lineno-1])
            # add trailing characters until node in current line starts
            script_lines.append(source_script_lines[node.lineno-1][:node.col_offset])
        elif last_offset >= 0:
            # no line change, add the characters from the end of previous node to the current
            script_lines.append(source_script_lines[last_line][last_offset:node.col_offset])
        # replace node value
        script_lines.append(astunparse.unparse(t_value).strip())
        last_line = node.end_lineno - 1
        last_offset = node.end_col_offset
    # add all that was missing
    if last_offset >= 0:
        script_lines.append(source_script_lines[last_line][last_offset:])
    script_lines.extend(source_script_lines[last_line+1:])
    return script_lines