code: def test_copy_to_propagate_error(self):
      class BrokenWrite(TextIOBase):
          def write(self, data):
              return 1 / 0
  
      curs = self.conn.cursor()
      curs.execute("insert into tcopy values (10, 'hi')")
      self.assertRaises(
          ZeroDivisionError, curs.copy_to, BrokenWrite(), "tcopy"
      )
  
imports: import io
  import sys
  import string
  import unittest
  from .testutils import ConnectingTestCase, skip_before_postgres, slow, StringIO
  from .testutils import skip_if_crdb
  from itertools import cycle
  from subprocess import Popen, PIPE
  import psycopg2
  import psycopg2.extensions
  from .testutils import skip_copy_if_green, TextIOBase
  from .testconfig import dsn
label_desc: Use image node_id 22 for calling the CopyTests obj's underlying member method code with example usage: obj.test_copy_to_propagate_error() and returns: unknown