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

    import matplotlib.pyplot as plt
    from matplotlib import transforms
    from matplotlib.ticker import MaxNLocator
    from matplotlib.ticker import ScalarFormatter
    if (not isinstance(gbrt, BaseGradientBoosting)):
        raise ValueError('gbrt    has    to    be    an    instance    of    BaseGradientBoosting')
    check_is_fitted(gbrt, 'estimators_')
    if (hasattr(gbrt, 'classes_') and (np.size(gbrt.classes_) > 2)):
        if (label is None):
            raise ValueError('label    is    not    given    for    multi-class    PDP')
        label_idx = np.searchsorted(gbrt.classes_, label)
        if (gbrt.classes_[label_idx] != label):
            raise ValueError(('label    %s    not    in    ``gbrt.classes_``' % str(label)))
    else:
        label_idx = 0
    X = check_array(X, dtype=DTYPE, order='C')
    if (gbrt.n_features_ != X.shape[1]):
        raise ValueError('X.shape[1]    does    not    match    gbrt.n_features_')
    if (line_kw is None):
        line_kw = {'color': 'green'}
    if (contour_kw is None):
        contour_kw = {}
    if (feature_names is None):
        feature_names = [str(i) for i in range(gbrt.n_features_)]
    elif isinstance(feature_names, np.ndarray):
        feature_names = feature_names.tolist()
    def convert_feature(fx):
        if isinstance(fx, six.string_types):
            try:
                fx = feature_names.index(fx)
            except ValueError:
                raise ValueError(('Feature    %s    not    in    feature_names' % fx))
        return fx
    tmp_features = []
    for fxs in features:
        if isinstance(fxs, ((numbers.Integral,) + six.string_types)):
            fxs = (fxs,)
        try:
            fxs = np.array([convert_feature(fx) for fx in fxs], dtype=np.int32)
        except TypeError:
            raise ValueError('features    must    be    either    int,    str,    or    tuple    of    int/str')
        if (not (1 <= np.size(fxs) <= 2)):
            raise ValueError('target    features    must    be    either    one    or   ...

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

def plot_partial_dependence(gbrt, X, features, feature_names=None, label=None, n_cols=3, grid_resolution=100, percentiles=(0.05, 0.95), n_jobs=1, verbose=0, ax=None, line_kw=None, contour_kw=None, **fig_kw):