code: def _fail_test_with_unexpected_errors(
      tb, msg_format, cupy_error, numpy_error
  ):
      # Fails the test due to unexpected errors raised from the test.
      # msg_format may include format placeholders:
      # '{cupy_error}' '{numpy_error}'
  
      msg = msg_format.format(
          cupy_error=_format_exception(cupy_error),
          numpy_error=_format_exception(numpy_error),
      )
  
      # Fail the test with the traceback of the error (for pytest --pdb)
      raise AssertionError(msg).with_traceback(tb)
  
imports: import functools
  import inspect
  import os
  import random
  from typing import Tuple, Type
  import traceback
  import unittest
  import warnings
  import numpy
  import cupy
  from cupy.testing import _array
  from cupy.testing import _parameterized
  import cupyx
  import cupyx.scipy.sparse
  from cupy.testing._pytest_impl import is_available
label_desc: Use image node_id 7 for calling a global function with example usage: _fail_test_with_unexpected_errors(tb, msg_format, cupy_error, numpy_error) without return types