code: def test_async_after_async(self):
      cur = self.conn.cursor()
      cur2 = self.conn.cursor()
      del cur2
  
      cur.execute("insert into table1 values (1)")
  
      # an async execute after an async one raises an exception
      self.assertRaises(
          psycopg2.ProgrammingError, cur.execute, "select * from table1"
      )
      # same for callproc
      self.assertRaises(
          psycopg2.ProgrammingError, cur.callproc, "version"
      )
      # but after you've waited it should be good
      self.wait(cur)
      cur.execute("select * from table1")
      self.wait(cur)
  
      self.assertEquals(cur.fetchall()[0][0], 1)
  
      cur.execute("delete from table1")
      self.wait(cur)
  
      cur.execute("select * from table1")
      self.wait(cur)
  
      self.assertEquals(cur.fetchone(), None)
  
imports: import gc
  import time
  import unittest
  import warnings
  import psycopg2
  import psycopg2.errors
  from psycopg2 import extensions
  from .testutils import ConnectingTestCase, StringIO, skip_before_postgres, skip_if_crdb, crdb_version, slow
label_desc: Use image node_id 6 for calling the AsyncTests obj's underlying member method code with example usage: obj.test_async_after_async() without return types