human
I wrote the below code

    clf = LinearSVC()
    (X, y_idx) = make_blobs(n_samples=100, n_features=2, random_state=42, centers=3, cluster_std=3.0)
    target_names = np.array(['a', 'b', 'c'])
    y = target_names[y_idx]
    (X_train, y_train) = (X[::2], y[::2])
    (X_test, y_test) = (X[1::2], y[1::2])
    clf.fit(X_train, y_train)
    for method in ['isotonic', 'sigmoid']:
        cal_clf = CalibratedClassifierCV(clf, method=method, cv=2)
        cal_clf.fit(X_train, y_train)
        probas = cal_clf.predict_proba(X_test)
        assert_array_almost_equal(np.sum(probas, axis=1), np.ones(len(X_test)))
        def softmax(y_pred):
            e = np.exp((- y_pred))
            return (e / e.sum(axis=1).reshape((-1), 1))
        uncalibrated_log_loss = log_loss(y_test, softmax(clf.decision_function(X_test)))
        calibrated_log_loss = log_loss(y_test, probas)
        assert_greater_equal(uncalibrated_log_loss, calibrated_log_loss)
    (X, y) = make_blobs(n_samples=100, n_features=2, random_state=42, cluster_std=3.0)
    (X_train, y_train) = (X[::2], y[::2])
    (X_test, y_test) = (X[1::2], y[1::2])
    clf = RandomForestClassifier(n_estimators=10, random_state=42)
    clf.fit(X_train, y_train)
    clf_probs = clf.predict_proba(X_test)
    loss = log_loss(y_test, clf_probs)
    for method in ['isotonic', 'sigmoid']:
        cal_clf = CalibratedClassifierCV(clf, method=method, cv=3)
        cal_clf.fit(X_train, y_train)
        cal_clf_probs = cal_clf.predict_proba(X_test)
        cal_loss = log_loss(y_test, cal_clf_probs)
        assert_greater(loss, cal_loss)

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def test_calibration_multiclass():