code: def setUp(self):
      self.forward_msg_queue = ForwardMsgQueue()
  
      # Save our thread's current ScriptRunContext
      self.orig_report_ctx = get_script_run_ctx()
  
      # Create a new ScriptRunContext to use for the test.
      self.script_run_ctx = ScriptRunContext(
          session_id="test session id",
          _enqueue=self.forward_msg_queue.enqueue,
          query_string="",
          session_state=SafeSessionState(SessionState(), lambda: None),
          uploaded_file_mgr=MemoryUploadedFileManager(
              UPLOAD_FILE_ENDPOINT
          ),
          main_script_path="",
          page_script_hash="",
          user_info={"email": "test@test.com"},
          script_requests=ScriptRequests(),
      )
      add_script_run_ctx(
          threading.current_thread(), self.script_run_ctx
      )
  
      # Create a MemoryMediaFileStorage instance, and the MediaFileManager
      # singleton.
      self.media_file_storage = MemoryMediaFileStorage(MEDIA_ENDPOINT)
  
      mock_runtime = MagicMock(spec=Runtime)
      mock_runtime.cache_storage_manager = MemoryCacheStorageManager()
      mock_runtime.media_file_mgr = MediaFileManager(
          self.media_file_storage
      )
      mock_runtime.uploaded_file_mgr = (
          self.script_run_ctx.uploaded_file_mgr
      )
      Runtime._instance = mock_runtime
  
imports: import threading
  import unittest
  from typing import List
  from unittest.mock import MagicMock
  from streamlit.proto.Delta_pb2 import Delta
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
  from streamlit.runtime import Runtime
  from streamlit.runtime.caching.storage.dummy_cache_storage import MemoryCacheStorageManager
  from streamlit.runtime.forward_msg_queue import ForwardMsgQueue
  from streamlit.runtime.media_file_manager import MediaFileManager
  from streamlit.runtime.memory_media_file_storage import MemoryMediaFileStorage
  from streamlit.runtime.memory_uploaded_file_manager import MemoryUploadedFileManager
  from streamlit.runtime.scriptrunner import ScriptRunContext, add_script_run_ctx, get_script_run_ctx
  from streamlit.runtime.scriptrunner.script_requests import ScriptRequests
  from streamlit.runtime.state import SafeSessionState, SessionState
  from streamlit.web.server.server import MEDIA_ENDPOINT, UPLOAD_FILE_ENDPOINT
label_desc: Use image node_id 1 for calling the DeltaGeneratorTestCase obj's underlying member method code with example usage: obj.setUp() without return types