def METHOD_NAME(cycles=10, n_pts=1000, sz=(1000, 1000)):
    print("realtime:", end=" ")
    width, height = sz
    pts = zeros((n_pts, 2), float)
    x = pts[:, 0]
    y = pts[:, 1]
    interval = width / float(n_pts)
    x[:] = arange(0, width, interval)
    flags = [
        kiva.FILL,
        kiva.EOF_FILL,
        kiva.STROKE,
        kiva.FILL_STROKE,
        kiva.EOF_FILL_STROKE,
    ]
    for flag in flags:
        t1 = perf_counter()
        for i in range(cycles):
            # TODO: module 'kiva.agg' has no attribute 'GraphicsContextBitmap'
            gc = agg.GraphicsContextBitmap(sz)
            y[:] = height / 2.0 + height / 2.0 * sin(
                x * 2 * pi / width + i * interval
            )
            gc.lines(pts)
            gc.draw_path(flag)
        t2 = perf_counter()
        agg.write_bmp_rgb24("draw_path%d.bmp" % flag, gc.bitmap)
        tot_time = t2 - t1
        print("tot,per cycle:", tot_time, tot_time / cycles)
    return