def METHOD_NAME(screen: Screen):
    @ui.page('/')
    def page(client: Client):
        ui.label('Label 1')
        client.on_connect(lambda: ui.label('Label 2'))
    screen.open('/')
    screen.should_contain('Label 2')