code: def create_mock_script_run_ctx() -> ScriptRunContext:
      """Create a ScriptRunContext for use in tests."""
      return ScriptRunContext(
          session_id="mock_session_id",
          _enqueue=lambda msg: None,
          query_string="mock_query_string",
          session_state=SafeSessionState(SessionState(), lambda: None),
          uploaded_file_mgr=MemoryUploadedFileManager("/mock/upload"),
          main_script_path="",
          page_script_hash="mock_page_script_hash",
          user_info={"email": "mock@test.com"},
      )
  
file_path: streamlit/lib/tests/testutil.py
imports: import json
  from contextlib import contextmanager
  from typing import TYPE_CHECKING
  from streamlit import config
  from streamlit.runtime.memory_uploaded_file_manager import MemoryUploadedFileManager
  from streamlit.runtime.scriptrunner import ScriptRunContext
  from streamlit.runtime.state import SafeSessionState, SessionState
  from tests.constants import SNOWFLAKE_CREDENTIAL_FILE
  from streamlit.testing.v1.util import build_mock_config_get_option
  from streamlit.testing.v1.util import patch_config_options
label_desc: Use image node_id 2 for calling a global function with example usage: create_mock_script_run_ctx() and returns: ScriptRunContext