code: def test_uses_active_session_if_in_sis(
      self, patched_get_active_session
  ):
      active_session_mock = MagicMock()
      active_session_mock.connection = "some active session"
      patched_get_active_session.return_value = active_session_mock
  
      conn = SnowflakeConnection("my_snowflake_connection")
      assert conn._instance == "some active session"
  
imports: import threading
  import unittest
  from unittest.mock import MagicMock, PropertyMock, patch
  import pytest
  import streamlit
  from streamlit.connections import SnowflakeConnection
  from streamlit.errors import StreamlitAPIException
  from streamlit.runtime.scriptrunner import add_script_run_ctx
  from streamlit.runtime.secrets import AttrDict
  from tests.testutil import create_mock_script_run_ctx
label_desc: Use image node_id 2 for calling the SnowflakeConnectionTest obj's underlying member method code with example usage: obj.test_uses_active_session_if_in_sis(patched_get_active_session) without return types