code: def test_get_records_exception(self):
      statement = "SQL"
      self.cur.fetchall.side_effect = RuntimeError("Great Problems")
  
      with pytest.raises(RuntimeError):
          self.db_hook.get_records(statement)
  
      assert self.conn.close.call_count == 1
      assert self.cur.close.call_count == 1
      self.cur.execute.assert_called_once_with(statement)
  
imports: from __future__ import annotations
  import json
  from unittest import mock
  import pytest
  from airflow.hooks.base import BaseHook
  from airflow.models import Connection
  from airflow.providers.common.sql.hooks.sql import DbApiHook, fetch_all_handler, fetch_one_handler
label_desc: Use image node_id 4 for calling the TestDbApiHook obj's underlying member method code with example usage: obj.test_get_records_exception() without return types