code: def test_error_message(self):
      def check(s, base=None):
          with self.assertRaises(
              ValueError, msg="int(%r, %r)" % (s, base)
          ) as cm:
              if base is None:
                  int(s)
              else:
                  int(s, base)
          self.assertEqual(
              cm.exception.args[0],
              "invalid literal for int() with base %d: %r"
              % (10 if base is None else base, s),
          )
  
      check("\xbd")
      check("123\xbd")
      check("  123 456  ")
  
      check("123\x00")
      # SF bug 1545497: embedded NULs were not detected with explicit base
      check("123\x00", 10)
      check("123\x00 245", 20)
      check("123\x00 245", 16)
      check("123\x00245", 20)
      check("123\x00245", 16)
      # byte string with embedded NUL
      check(b"123\x00")
      check(b"123\x00", 10)
      # non-UTF-8 byte string
      check(b"123\xbd")
      check(b"123\xbd", 10)
      # lone surrogate in Unicode string
      check("123\ud800")
      check("123\ud800", 10)
  
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 18 for calling the IntTestCases obj's underlying member method code with example usage: obj.test_error_message() without return types