def METHOD_NAME(cv):
    try:
        from sklearn.model_selection import LeaveOneGroupOut
        gcv = LeaveOneGroupOut()
    except ImportError:
        # won't import model selection if it's not there.
        # the groups variable should have no effect.
        gcv = cv
    return gcv