code: def test_set_parameters_while_async(self):
      cur = self.conn.cursor()
  
      cur.execute("select 'c'")
      self.assertTrue(self.conn.isexecuting())
  
      # getting transaction status works
      self.assertEquals(
          self.conn.info.transaction_status,
          ext.TRANSACTION_STATUS_ACTIVE,
      )
      self.assertTrue(self.conn.isexecuting())
  
      # setting connection encoding should fail
      self.assertRaises(
          psycopg2.ProgrammingError,
          self.conn.set_client_encoding,
          "LATIN1",
      )
  
      # same for transaction isolation
      self.assertRaises(
          psycopg2.ProgrammingError, self.conn.set_isolation_level, 1
      )
  
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 10 for calling the AsyncTests obj's underlying member method code with example usage: obj.test_set_parameters_while_async() without return types