human
I wrote the below code

    if (final_color is None):
        final_color = (0 if clip.ismask else [0, 0, 0])
    final_color = np.array(final_color)
    def fl(gf, t):
        if ((clip.duration - t) >= duration):
            return gf(t)
        else:
            fading = ((1.0 * (clip.duration - t)) / duration)
            return ((fading * gf(t)) + ((1 - fading) * final_color))
    return clip.fl(fl)

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

@requires_duration
def fadeout(clip, duration, final_color=None):