human
I wrote the below code

    pal = []
    if as_cmap:
        cmap = _init_mutable_colormap()
    @interact
    def choose_cubehelix(n_colors=IntSlider(min=2, max=16, value=9), start=FloatSlider(min=0, max=3, value=0), rot=FloatSlider(min=(-1), max=1, value=0.4), gamma=FloatSlider(min=0, max=5, value=1), hue=FloatSlider(min=0, max=1, value=0.8), light=FloatSlider(min=0, max=1, value=0.85), dark=FloatSlider(min=0, max=1, value=0.15), reverse=False):
        if as_cmap:
            colors = cubehelix_palette(256, start, rot, gamma, hue, light, dark, reverse)
            _update_lut(cmap, np.c_[(colors, np.ones(256))])
            _show_cmap(cmap)
        else:
            pal[:] = cubehelix_palette(n_colors, start, rot, gamma, hue, light, dark, reverse)
            palplot(pal)
    if as_cmap:
        return cmap
    return pal

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

def choose_cubehelix_palette(as_cmap=False):