code: def _build_model(work: ServeStreamlit) -> None:
      import streamlit as st
  
      # Build the model (once per session, equivalent to gradio when enable_queue is Flase)
      if "_model" not in st.session_state:
          with st.spinner("Building model..."):
              st.session_state["_model"] = work.build_model()
  
      work._model = st.session_state["_model"]
  
imports: import abc
  import inspect
  import os
  import pydoc
  import subprocess
  import sys
  from typing import Any, Callable, Type
  from lightning.app.core.work import LightningWork
  from lightning.app.utilities.app_helpers import StreamLitStatePlugin
  from lightning.app.utilities.state import AppState
label_desc: Use image node_id 3 for calling a global function with example usage: _build_model(work) without return types