I am working with an imbalanced data set that has multiple observations from the same set of users. I want to make sure that I don't have the same users in both the training and test sets while still maintaining the original distribution as much as possible. I have been trying to combine the GroupKFold and StratifiedKFold functions from Sklearn but I'm kind of at a loss how to do it. Does anyone have any ideas of how I could combine these two functions?