def METHOD_NAME(pattern):
    page = site['/demo']
    page_cols = 4
    page_rows = 5
    box_width = 134
    box_height = 76
    gap = 15
    max_width = box_width * page_cols + (page_cols - 1) * gap
    max_height = box_height * page_rows + (page_rows - 1) * gap
    width = 10
    height = 10
    grid_cols = max_width // width
    grid_rows = max_height // height
    background = 'whitesmoke'
    stroke = 'gainsboro'
    stroke_width = 1
    grid = create_grid(
        grid_rows, grid_cols, background, width, height, stroke, stroke_width
    )
    page['game'] = ui.graphics_card(
        box=f'1 1 {page_cols} {page_rows}',
        view_box=f'0 0 {max_width} {max_height}',
        width='100%',
        height='100%',
        scene=g.scene(**grid),
    )
    grid_state = get_empty_state(grid_rows, grid_cols)
    update_grid(page, grid_state, grid_rows, grid_cols, background)
    grid_state = apply_start_state(grid_state, pattern)
    update_grid(page, grid_state, grid_rows, grid_cols, background)
    while True:
        time.sleep(0.1)
        new_grid_state = evaluate_grid(grid_state)
        update_grid(page, new_grid_state, grid_rows, grid_cols, background)
        grid_state = new_grid_state