def get_model_scores(model, train_test_sets):
    """
    Returns scores produced by trained estimator
    Uses the `predict_proba` attribute or the `decision_function`,
    whichever is available.

    Input
    -----
    model: trained (fitted) classifier
    train_test_sets: tuple of (X_tr_scaled, y_tr, X_te_scaled, y_te)

    Returns
    -------
    probs_positive_class: model scores

    """
    X_tr_scaled, y_tr, X_te_scaled, y_te = train_test_sets

    if hasattr(model, 'predict_proba'):
        probs_positive_class = model.predict_proba(X_te_scaled)[:, 1]
    else:
        probs_positive_class = model.decision_function(X_te_scaled)
        probs_positive_class = \
        (probs_positive_class-probs_positive_class.min())/(probs_positive_class.max()-probs_positive_class.min())

    return probs_positive_class