human
I wrote the below code

    def format_as_percent(x, round_to=0):
        return '{0:.{1:d}f}%'.format((100 * x), round_to)
    def display_ref_val(ref_val):
        less_than_ref_probability = (trace_values < ref_val).mean()
        greater_than_ref_probability = (trace_values >= ref_val).mean()
        ref_in_posterior = '{}    <{:g}<    {}'.format(format_as_percent(less_than_ref_probability, 1), ref_val, format_as_percent(greater_than_ref_probability, 1))
        ax.axvline(ref_val, ymin=0.02, ymax=0.75, color='g', linewidth=4, alpha=0.65)
        ax.text(trace_values.mean(), (plot_height * 0.6), ref_in_posterior, size=text_size, horizontalalignment='center')
    def display_rope(rope):
        ax.plot(rope, ((plot_height * 0.02), (plot_height * 0.02)), linewidth=20, color='r', alpha=0.75)
        text_props = dict(size=text_size, horizontalalignment='center', color='r')
        ax.text(rope[0], (plot_height * 0.14), rope[0], **text_props)
        ax.text(rope[1], (plot_height * 0.14), rope[1], **text_props)
    def display_point_estimate():
        if (not point_estimate):
            return
        if (point_estimate not in ('mode', 'mean', 'median')):
            raise ValueError("Point    Estimate    should    be    in    ('mode','mean','median')")
        if (point_estimate == 'mean'):
            point_value = trace_values.mean()
        elif (point_estimate == 'mode'):
            if isinstance(trace_values[0], float):
                (density, l, u) = fast_kde(trace_values)
                x = np.linspace(l, u, len(density))
                point_value = x[np.argmax(density)]
            else:
                point_value = mode(trace_values.round(round_to))[0][0]
        elif (point_estimate == 'median'):
            point_value = np.median(trace_values)
        point_text = '{point_estimate}={point_value:.{round_to}f}'.format(point_estimate=point_estimate, point_value=point_value, round_to=round_to)
        ax.text(point_value, (plot_height * 0.8), point_text, size=text_size, horizontalalignment='center')
    def...

What's a good function header?

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

def plot_posterior_op(trace_values, ax, kde_plot, point_estimate, round_to, alpha_level, ref_val, rope, text_size=16, **kwargs):