Creating Python Code Within A Provided Definition