Convert python code to genie code