code: def test_immutable_types(self):
      root = cET.fromstring("<a></a>")
      dataset = (
          cET.Element,
          cET.TreeBuilder,
          cET.XMLParser,
          type(root.iter()),
      )
      for tp in dataset:
          with self.subTest(tp=tp):
              with self.assertRaisesRegex(TypeError, "immutable"):
                  tp.foo = 1
  
imports: import io
  import struct
  from test import support
  from test.support.import_helper import import_fresh_module
  import types
  import unittest
label_desc: Use image node_id 11 for calling the MiscTests obj's underlying member method code with example usage: obj.test_immutable_types() without return types