code: def test_bad_assignments(self):
      ts = self.ts
      integer_attributes = [
          "T_BOOL",
          "T_BYTE",
          "T_UBYTE",
          "T_SHORT",
          "T_USHORT",
          "T_INT",
          "T_UINT",
          "T_LONG",
          "T_ULONG",
          "T_PYSSIZET",
      ]
      if hasattr(ts, "T_LONGLONG"):
          integer_attributes.extend(["T_LONGLONG", "T_ULONGLONG"])
  
      # issue8014: this produced 'bad argument to internal function'
      # internal error
      for nonint in None, 3.2j, "full of eels", {}, []:
          for attr in integer_attributes:
              self.assertRaises(TypeError, setattr, ts, attr, nonint)
  
imports: import unittest
  from test.support import import_helper
  from test.support import warnings_helper
  from _testcapi import _test_structmembersType_OldAPI, _test_structmembersType_NewAPI, CHAR_MAX, CHAR_MIN, UCHAR_MAX, SHRT_MAX, SHRT_MIN, USHRT_MAX, INT_MAX, INT_MIN, UINT_MAX, LONG_MAX, LONG_MIN, ULONG_MAX, LLONG_MAX, LLONG_MIN, ULLONG_MAX, PY_SSIZE_T_MAX, PY_SSIZE_T_MIN
label_desc: Use image node_id 9 for calling the ReadWriteTests obj's underlying member method code with example usage: obj.test_bad_assignments() without return types