translate to python