code: def test_copy_while_async(self):
      cur = self.conn.cursor()
      cur.execute("select 'a'")
  
      # copy should fail
      self.assertRaises(
          psycopg2.ProgrammingError,
          cur.copy_from,
          StringIO("1\n3\n5\n\\.\n"),
          "table1",
      )
  
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 13 for calling the AsyncTests obj's underlying member method code with example usage: obj.test_copy_while_async() without return types