code: def test_fake_cursor_class(self):
      # Issue #24257: Incorrect use of PyObject_IsInstance() caused
      # segmentation fault.
      # Issue #27861: Also applies for cursor factory.
      class FakeCursor(str):
          __class__ = sqlite.Cursor
  
      self.assertRaises(TypeError, self.con.cursor, FakeCursor)
      self.assertRaises(TypeError, sqlite.Row, FakeCursor(), ())
  
imports: import unittest
  import sqlite3
  from collections.abc import Sequence
  from .util import memory_database
  from .util import MemoryDatabaseMixin
label_desc: Use image node_id 12 for calling the RowFactoryTests obj's underlying member method code with example usage: obj.test_fake_cursor_class() without return types