Add python binding for bagging.