code: def test_app_state_with_structures():
      app = LightningApp(FlowStructures())
      state = AppState()
      state._last_state = app.state
      state._state = app.state
      assert state.w_list["0"].counter == 0
      assert len(state.w_list) == 2
      assert state.w_dict["toto"].counter == 0
      assert [k for k, _ in state.w_dict.items()] == ["toto", "toto_2"]
      assert [k for k, _ in state.w_list.items()] == ["0", "1"]
  
      app = LightningApp(FlowStructuresEmpty())
      state = AppState()
      state._last_state = app.state
      state._state = app.state
      assert state.w_list
  
imports: import os
  from re import escape
  from unittest import mock
  import lightning.app
  import pytest
  import requests
  from lightning.app import LightningApp, LightningFlow, LightningWork
  from lightning.app.structures import Dict, List
  from lightning.app.utilities.app_helpers import AppStatePlugin, BaseStatePlugin
  from lightning.app.utilities.state import AppState
  from lightning_cloud.openapi import Externalv1LightningappInstance, V1LightningappInstanceStatus
label_desc: Use image node_id 12 for calling a global function with example usage: test_app_state_with_structures() without return types