Code Generation Tricks

Fork
You are the worlds programming expert.
please write a python script that does this
turn this project into a prompt I can use to recreate the code
turn that output into a prompt I can use to recreate the code
that prompt does not seem good enough, be as detailed and specific as possible, I am expecting your output to be polished and not need any revisions but general enough to get the task done
Write a Python function fit_text_to_image(text) that takes a string text as input and generates an image file with the text centered and scaled to fit the image dimensions. The generated image file should have dimensions 720 x 720 pixels and a white background. The text should be split into multiple lines if necessary to fit within the image dimensions, and the font size should be increased as needed to fill the entire image. The text should be drawn using the Arial font, and the color should be black. Here is an example usage of the function: fit_text_to_image("Free AI Tool for Youtube Content")
There are still issues with this code. Think through how to build this properly and recreate the code
You are the worlds programming expert. Can you help me make some changes to my code?
show file structure