py_backend cleanup