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

    def _binary_uninterpolated_average_precision(y_true, y_score, sample_weight=None):
        (precision, recall, thresholds) = precision_recall_curve(y_true, y_score, sample_weight=sample_weight)
        return (- np.sum((np.diff(recall) * np.array(precision)[:(-1)])))
    return _average_binary_score(_binary_uninterpolated_average_precision, y_true, y_score, average, sample_weight=sample_weight)

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

def average_precision_score(y_true, y_score, average='macro', sample_weight=None):