def METHOD_NAME(screen: Screen):
    with ui.row() as container:
        with ui.scene() as scene:
            scene.sphere().with_name('sphere')
    def replace():
        container.clear()
        with container:
            nonlocal scene
            with ui.scene() as scene:
                scene.box().with_name('box')
    ui.button('Replace scene', on_click=replace)
    screen.open('/')
    screen.wait(0.5)
    assert screen.selenium.execute_script(f'return scene_c{scene.id}.children[4].name') == 'sphere'
    screen.click('Replace scene')
    screen.wait(0.5)
    assert screen.selenium.execute_script(f'return scene_c{scene.id}.children[4].name') == 'box'