Make partioner for python.