expose a method to python