Code with double quotation marks inside fails with CodeInterpreterTool

I created an agent using CodeInterpreterTool to run code generated by LLM. However, in some iterations, the CodeInterpreterTool fails in running the code, while the generated code itself is totally correct. I checked the crewai source code and found the following part:

    cmd_to_run = f'python3 -c "{code}"'
    exec_result = container.exec_run(cmd_to_run)

It seems like that when the code with double quotation mark inside will fail here. Are there any solutions?