docstr: Runtime.instance() returns our singleton instance.
docstr_tok: ["Runtime.instance","(",")","returns","our","singleton","instance","."]
code: def test_instance_class_method(self):
      """Runtime.instance() returns our singleton instance."""
      with self.assertRaises(RuntimeError):
          # No Runtime: error
          Runtime.instance()
  
      # Runtime instantiated: no error
      _ = Runtime(MagicMock())
      Runtime.instance()
  
imports: import asyncio
  import os
  import shutil
  import tempfile
  import unittest
  from typing import List
  from unittest.mock import ANY, MagicMock, call, patch
  import pytest
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
  from streamlit.runtime import Runtime, RuntimeConfig, RuntimeState, SessionClient, SessionClientDisconnectedError
  from streamlit.runtime.caching.storage.local_disk_cache_storage import LocalDiskCacheStorageManager
  from streamlit.runtime.forward_msg_cache import populate_hash_if_needed
  from streamlit.runtime.memory_media_file_storage import MemoryMediaFileStorage
  from streamlit.runtime.memory_session_storage import MemorySessionStorage
  from streamlit.runtime.memory_uploaded_file_manager import MemoryUploadedFileManager
  from streamlit.runtime.runtime import AsyncObjects, RuntimeStoppedError
  from streamlit.runtime.websocket_session_manager import WebsocketSessionManager
  from streamlit.watcher import event_based_path_watcher
  from tests.streamlit.message_mocks import create_dataframe_msg, create_script_finished_message
  from tests.streamlit.runtime.runtime_test_case import RuntimeTestCase
  from tests.testutil import patch_config_options
label_desc: Use image node_id 4 for calling the RuntimeSingletonTest obj's underlying member method code with example usage: obj.test_instance_class_method() without return types