code: def render_fn(state: AppState):
      import streamlit as st
  
      should_print = st.button("Should print to the terminal ?")
  
      if should_print:
          state.should_print = not state.should_print
  
      st.write(
          "Currently printing."
          if state.should_print
          else "Currently waiting to print."
      )
  
file_path: pytorch-lightning/examples/app/template_streamlit_ui/app.py
imports: from lightning.app import LightningApp, LightningFlow
  from lightning.app.frontend import StreamlitFrontend
  from lightning.app.utilities.state import AppState
label_desc: Use image node_id 1 for calling a global function with example usage: render_fn(state) without return types