code: def test_bad_encoding(self):
      with self.assertRaises(UnicodeEncodeError):
          self.json.encoder.JSONEncoder(encoding="\udcff").encode(
              {"key": 123}
          )
  
file_path: catboost/contrib/tools/python/src/Lib/json/tests/test_speedups.py
imports: from json.tests import CTest
label_desc: Use image node_id 3 for calling the TestEncode obj's underlying member method code with example usage: obj.test_bad_encoding() without return types