code: def stop() -> NoReturn:  # type: ignore[misc]
      """Stops execution immediately.
  
      Streamlit will not run any statements after `st.stop()`.
      We recommend rendering a message to explain why the script has stopped.
  
      Example
      -------
      >>> import streamlit as st
      >>>
      >>> name = st.text_input('Name')
      >>> if not name:
      >>>   st.warning('Please input a name.')
      >>>   st.stop()
      >>> st.success('Thank you for inputting a name.')
  
      """
      ctx = get_script_run_ctx()
  
      if ctx and ctx.script_requests:
          ctx.script_requests.request_stop()
          # Force a yield point so the runner can stop
          st.empty()
  
file_path: streamlit/lib/streamlit/commands/execution_control.py
imports: import os
  from typing import NoReturn
  import streamlit
  from streamlit import source_util
  from streamlit.deprecation_util import make_deprecated_name_warning
  from streamlit.errors import NoSessionContext, StreamlitAPIException
  from streamlit.logger import get_logger
  from streamlit.runtime.metrics_util import gather_metrics
  from streamlit.runtime.scriptrunner import RerunData, get_script_run_ctx
label_desc: Use image node_id 1 for calling a global function with example usage: stop() without return types