human
I wrote the below code

    if (transition is not None):
        l = [[v, transition] for v in clips[:(-1)]]
        clips = (reduce((lambda x, y: (x + y)), l) + [clips[(-1)]])
        transition = None
    tt = np.cumsum(([0] + [c.duration for c in clips]))
    sizes = [v.size for v in clips]
    w = max([r[0] for r in sizes])
    h = max([r[1] for r in sizes])
    tt = np.maximum(0, (tt + (padding * np.arange(len(tt)))))
    if (method == 'chain'):
        def make_frame(t):
            i = max([i for (i, e) in enumerate(tt) if (e <= t)])
            return clips[i].get_frame((t - tt[i]))
        def get_mask(c):
            mask = (c.mask or ColorClip([1, 1], col=1, ismask=True))
            if (mask.duration is None):
                mask.duration = c.duration
            return mask
        result = VideoClip(ismask=ismask, make_frame=make_frame)
        if any([(c.mask is not None) for c in clips]):
            masks = [get_mask(c) for c in clips]
            result.mask = concatenate_videoclips(masks, method='chain', ismask=True)
            result.clips = clips
    elif (method == 'compose'):
        result = CompositeVideoClip([c.set_start(t).set_pos('center') for (c, t) in zip(clips, tt)], size=(w, h), bg_color=bg_color, ismask=ismask)
    else:
        raise Exception("Moviepy    Error:    The    'method'    argument    of    concatenate_videoclips    must    be    'chain'    or    'compose'")
    result.tt = tt
    result.start_times = tt[:(-1)]
    (result.start, result.duration, result.end) = (0, tt[(-1)], tt[(-1)])
    audio_t = [(c.audio, t) for (c, t) in zip(clips, tt) if (c.audio is not None)]
    if (len(audio_t) > 0):
        result.audio = CompositeAudioClip([a.set_start(t) for (a, t) in audio_t])
    fpss = [c.fps for c in clips if (hasattr(c, 'fps') and (c.fps is not None))]
    if (len(fpss) == 0):
        result.fps = None
    else:
        result.fps = max(fpss)
    return result

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

def concatenate_videoclips(clips, method='chain', transition=None, bg_color=None, ismask=False, padding=0):