code: def test_passing_transaction_self_managed(db):
      conn = db.get_connection()
      tx = conn.transaction()
      conn.query("INSERT INTO foo VALUES (42)")
      conn.query("INSERT INTO foo VALUES (43)")
      tx.commit()
      conn.close()
      assert db.query("SELECT count(*) AS n FROM foo")[0].n == 2
  
imports: import pytest
label_desc: Use image node_id 5 for calling a global function with example usage: test_passing_transaction_self_managed(db) without return types