code: def _get_state() -> AppState:
      app_state = AppState()
      return _reduce_to_flow_scope(
          app_state, flow=os.environ["LIGHTNING_FLOW_NAME"]
      )
  
file_path: pytorch-lightning/src/lightning/app/frontend/just_py/just_py_base.py
imports: import os
  import pydoc
  from typing import Any, Callable
  from lightning.app.frontend.utils import _reduce_to_flow_scope
  from lightning.app.utilities.state import AppState
label_desc: Use image node_id 1 for calling a global function with example usage: _get_state() and returns: _reduce_to_flow_scope