Added function dump_to_python