How do I know Gemini used the code execution tool?

Hi,
I want Gemini to create math questions with python.
Now, how do I actually know from the response it used python? I only see the math question in the output but not python code.

Also, I am a bit confused because with gpt API I need to enable the code_intepreter and can also specify ram used for the container. This does not seem to be the case with gemini? It does it under the hood? But then how is it priced? With gpt the code intepreter is priced on top of the usual prompts for the RAM usage.

Thanks a lot!