human
Here's a good function header given the following:
I wrote the below code

    if (scoring != 'misclassification    error'):
        from sklearn import metrics
        scoring_func = {'accuracy': metrics.accuracy_score, 'average_precision': metrics.average_precision_score, 'f1': metrics.f1_score, 'f1_micro': metrics.f1_score, 'f1_macro': metrics.f1_score, 'f1_weighted': metrics.f1_score, 'f1_samples': metrics.f1_score, 'log_loss': metrics.log_loss, 'precision': metrics.precision_score, 'recall': metrics.recall_score, 'roc_auc': metrics.roc_auc_score, 'adjusted_rand_score': metrics.adjusted_rand_score, 'mean_absolute_error': metrics.mean_absolute_error, 'mean_squared_error': metrics.mean_squared_error, 'median_absolute_error': metrics.median_absolute_error, 'r2': metrics.r2_score}
        if (scoring not in scoring_func.keys()):
            raise AttributeError('scoring    must    be    in', scoring_func.keys())
    else:
        def misclf_err(y_predict, y):
            return ((y_predict != y).sum() / float(len(y)))
        scoring_func = {'misclassification    error': misclf_err}
    training_errors = []
    test_errors = []
    rng = [int(i) for i in np.linspace(0, X_train.shape[0], 11)][1:]
    for r in rng:
        model = clf.fit(X_train[:r], y_train[:r])
        y_train_predict = clf.predict(X_train[:r])
        y_test_predict = clf.predict(X_test)
        train_misclf = scoring_func[scoring](y_train[:r], y_train_predict)
        training_errors.append(train_misclf)
        test_misclf = scoring_func[scoring](y_test, y_test_predict)
        test_errors.append(test_misclf)
    if (not suppress_plot):
        with plt.style.context(style):
            plt.plot(np.arange(10, 101, 10), training_errors, label='training    set', marker=train_marker)
            plt.plot(np.arange(10, 101, 10), test_errors, label='test    set', marker=test_marker)
            plt.xlabel('Training    set    size    in    percent')
    if (not suppress_plot):
        with plt.style.context(style):
            plt.ylabel('Performance    ({})'.format(scoring))
            if print_model:
              ...

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

def plot_learning_curves(X_train, y_train, X_test, y_test, clf, train_marker='o', test_marker='^', scoring='misclassification    error', suppress_plot=False, print_model=True, style='fivethirtyeight', legend_loc='best'):