def METHOD_NAME(cycles=10, n_pts=1000, sz=(1000, 1000)):
    """ Render a sin wave to the screen repeatedly.  Clears
        the screen between each rendering.
    """
    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)
    t1 = perf_counter()
    # TODO: module 'kiva.agg' has no attribute 'GraphicsContextBitmap'
    gc = agg.GraphicsContextBitmap(sz)
    for i in range(cycles):
        y[:] = height / 2.0 + height / 2.0 * sin(
            x * 2 * pi / width + i * interval
        )
        # gc.clear()
        gc.lines(pts)
        gc.stroke_path()
        # agg.write_bmp_rgb24("sin%d.bmp" % i,gc.bitmap)
    t2 = perf_counter()
    tot_time = t2 - t1
    print("tot,per cycle:", tot_time, tot_time / cycles)