I am trying to implement modified bagging classifier like this. what is the best way to implement this modified classifier?Is it possible to implement this with sklearn packages?If the answer is yes how can do this? for more details about this problem there is some pseudocode. I want to use grid search with this modified classifier.because of that it is better to implement this with sklearn packages.