a code_generator written by python