code: def test_issue98248(self):
      def test_error_msg(prefix, int_type, is_unsigned):
          fmt_str = prefix + int_type
          size = struct.calcsize(fmt_str)
          if is_unsigned:
              max_ = 2 ** (size * 8) - 1
              min_ = 0
          else:
              max_ = 2 ** (size * 8 - 1) - 1
              min_ = -(2 ** (size * 8 - 1))
          error_msg = (
              f"'{int_type}' format requires {min_} <= number <= {max_}"
          )
          for number in [int(-1e50), min_ - 1, max_ + 1, int(1e50)]:
              with self.subTest(format_str=fmt_str, number=number):
                  with self.assertRaisesRegex(struct.error, error_msg):
                      struct.pack(fmt_str, number)
          error_msg = "required argument is not an integer"
          not_number = ""
          with self.subTest(format_str=fmt_str, number=not_number):
              with self.assertRaisesRegex(struct.error, error_msg):
                  struct.pack(fmt_str, not_number)
  
      for prefix in "@=<>":
          for int_type in "BHILQ":
              test_error_msg(prefix, int_type, True)
          for int_type in "bhilq":
              test_error_msg(prefix, int_type, False)
  
      int_type = "N"
      test_error_msg("@", int_type, True)
  
      int_type = "n"
      test_error_msg("@", int_type, False)
  
imports: from collections import abc
  import array
  import gc
  import math
  import operator
  import unittest
  import struct
  import sys
  import weakref
  from test import support
  from test.support import import_helper
  from test.support.script_helper import assert_python_ok
label_desc: Use image node_id 30 for calling the StructTest obj's underlying member method code with example usage: obj.test_issue98248() without return types