code: def test_update_flow_state(flow_state_state: dict):
      """We can update the state.
  
      - the .state is scoped to the flow state
  
      """
      app = AppStateWatcher()
      org_state = app.state
      app._update_flow_state()
      assert app.state is not org_state
      assert app.state._state == flow_state_state
  
file_path: pytorch-lightning/tests/tests_app/frontend/panel/test_app_state_watcher.py
imports: import os
  from unittest import mock
  import pytest
  from lightning.app.frontend.panel.app_state_watcher import AppStateWatcher
  from lightning.app.utilities.state import AppState
  from lightning_utilities.core.imports import RequirementCache
label_desc: Use image node_id 3 for calling a global function with example usage: test_update_flow_state(flow_state_state) without return types