code: def rerun() -> NoReturn:  # type: ignore[misc]
      """Rerun the script immediately.
  
      When ``st.rerun()`` is called, the script is halted - no more statements will
      be run, and the script will be queued to re-run from the top.
      """
  
      ctx = get_script_run_ctx()
  
      if ctx and ctx.script_requests:
          query_string = ctx.query_string
          page_script_hash = ctx.page_script_hash
  
          ctx.script_requests.request_rerun(
              RerunData(
                  query_string=query_string,
                  page_script_hash=page_script_hash,
              )
          )
          # Force a yield point so the runner can do the rerun
          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 2 for calling a global function with example usage: rerun() without return types