code: def test_encoding_from_conn(self):
      q = psycopg2.extensions.QuotedString("hi")
      self.assertEqual(q.encoding, "latin1")
  
      self.conn.set_client_encoding("utf_8")
      q.prepare(self.conn)
      self.assertEqual(q.encoding, "utf_8")
  
imports: from .None import testutils
  import unittest
  from .testutils import ConnectingTestCase, skip_if_crdb
  import psycopg2
  import psycopg2.extensions
  from psycopg2.extensions import adapt, quote_ident
label_desc: Use image node_id 1 for calling the TestQuotedString obj's underlying member method code with example usage: obj.test_encoding_from_conn() without return types