for node in tree.body:
            if isinstance(
                node,
                (esprima.nodes.FunctionDeclaration, esprima.nodes.ClassDeclaration),
            ):
                start = node.loc.start.line - 1
                simplified_lines[start] = f"// Code for: {simplified_lines[start]}"
                for line_num in range(start + 1, node.loc.end.line):
                    simplified_lines[line_num] = None  # type: ignore
        return "\n".join(line for line in simplified_lines if line is not None)