code: def setUp(self):
      ConnectingTestCase.setUp(self)
      skip_if_crdb("isolation level", self.conn)
      self.conn.set_isolation_level(ISOLATION_LEVEL_SERIALIZABLE)
      curs = self.conn.cursor()
      curs.execute(
          """
              CREATE TEMPORARY TABLE table1 (
                id int PRIMARY KEY
              )"""
      )
      # The constraint is set to deferrable for the commit_failed test
      curs.execute(
          """
              CREATE TEMPORARY TABLE table2 (
                id int PRIMARY KEY,
                table1_id int,
                CONSTRAINT table2__table1_id__fk
                  FOREIGN KEY (table1_id) REFERENCES table1(id) DEFERRABLE)"""
      )
      curs.execute("INSERT INTO table1 VALUES (1)")
      curs.execute("INSERT INTO table2 VALUES (1, 1)")
      self.conn.commit()
  
imports: import threading
  import unittest
  from .testutils import ConnectingTestCase, skip_before_postgres, slow
  from .testutils import skip_if_crdb
  import psycopg2
  from psycopg2.extensions import ISOLATION_LEVEL_SERIALIZABLE, STATUS_BEGIN, STATUS_READY
label_desc: Use image node_id 1 for calling the TransactionTests obj's underlying member method code with example usage: obj.setUp() without return types