def wrap_sklearn_like_estimator(estimator):
    if isinstance(estimator, Estimator):
        return estimator
    elif estimator is None:
        return None
    elif not (hasattr(estimator, "fit") and (hasattr(estimator, "predict")
                                          or hasattr(estimator, "predict_proba"))):
        raise ValueError, estimator % "Invalid estimator: %s"
    elif hasattr(estimator, "predict_proba"):
        return Probabilities(estimator)
    else:
        return Estimator(estimator)
dataset/ETHPy150Open kvh/ramp/ramp/estimators/base.py/wrap_sklearn_like_estimator/swapped operands of `%`