code: def test_retry_behavior(self):
      from snowflake.connector.errors import ProgrammingError
      from snowflake.connector.network import (
          MASTER_TOKEN_EXPIRED_GS_CODE,
      )
  
      mock_cursor = MagicMock()
      mock_cursor.fetch_pandas_all = MagicMock(
          side_effect=ProgrammingError(
              "oh noes :(", errno=int(MASTER_TOKEN_EXPIRED_GS_CODE)
          )
      )
  
      conn = SnowflakeConnection("my_snowflake_connection")
      conn._instance.cursor.return_value = mock_cursor
  
      with patch.object(
          conn, "reset", wraps=conn.reset
      ) as wrapped_reset:
          with pytest.raises(ProgrammingError):
              conn.query("SELECT 1;")
  
          # Our connection should have been reset after each failed attempt to call
          # query.
          assert wrapped_reset.call_count == 3
  
      # conn._connect should have been called three times: once in the initial
      # connection, then once each after the second and third attempts to call
      # query.
      assert conn._connect.call_count == 3
  
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 10 for calling the SnowflakeConnectionTest obj's underlying member method code with example usage: obj.test_retry_behavior() without return types