def METHOD_NAME(rect: ui.Rect):
    def on_draw(c):
        c.paint.style = c.paint.Style.FILL
        c.paint.color = "ffffff"
        c.draw_rect(rect)
        cron.after("150ms", canvas.close)
    canvas = Canvas.from_rect(rect)
    canvas.register("draw", on_draw)
    canvas.freeze()