code: def test_non_numeric_input_types(self):
      # Test possible non-numeric types for the argument x, including
      # subclasses of the explicitly documented accepted types.
      class CustomStr(str):
          pass
  
      class CustomBytes(bytes):
          pass
  
      class CustomByteArray(bytearray):
          pass
  
      factories = [
          bytes,
          bytearray,
          lambda b: CustomStr(b.decode()),
          CustomBytes,
          CustomByteArray,
          memoryview,
      ]
      try:
          from array import array
      except ImportError:
          pass
      else:
          factories.append(lambda b: array("B", b))
  
      for f in factories:
          x = f(b"100")
          with self.subTest(type(x)):
              self.assertEqual(int(x), 100)
              if isinstance(x, (str, bytes, bytearray)):
                  self.assertEqual(int(x, 2), 4)
              else:
                  msg = "can't convert non-string"
                  with self.assertRaisesRegex(TypeError, msg):
                      int(x, 2)
              with self.assertRaisesRegex(
                  ValueError, "invalid literal"
              ):
                  int(f(b"A" * 0x10))
  
imports: import sys
  import time
  import unittest
  from unittest import mock
  from test import support
  from test.test_grammar import VALID_UNDERSCORE_LITERALS, INVALID_UNDERSCORE_LITERALS
label_desc: Use image node_id 11 for calling the IntTestCases obj's underlying member method code with example usage: obj.test_non_numeric_input_types() without return types