Ported taketoken to pydriver