human
I wrote the below code

    has_images = any((isinstance(x, _ImageBase) for x in artists))
    not_composite = renderer.option_image_nocomposite()
    if (suppress_composite is not None):
        not_composite = suppress_composite
    if (not_composite or (not has_images)):
        for a in artists:
            a.draw(renderer)
    else:
        image_group = []
        mag = renderer.get_image_magnification()
        def flush_images():
            if (len(image_group) == 1):
                image_group[0].draw(renderer)
            elif (len(image_group) > 1):
                (data, l, b) = composite_images(image_group, renderer, mag)
                if (data.size != 0):
                    gc = renderer.new_gc()
                    gc.set_clip_rectangle(parent.bbox)
                    gc.set_clip_path(parent.get_clip_path())
                    renderer.draw_image(gc, np.round(l), np.round(b), data)
                    gc.restore()
            del image_group[:]
        for a in artists:
            if (isinstance(a, _ImageBase) and a.can_composite()):
                image_group.append(a)
            else:
                flush_images()
                a.draw(renderer)
        flush_images()

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

def _draw_list_compositing_images(renderer, parent, artists, suppress_composite=None):