Ported user_functions to pydriver