code: def _check_numpy_cupy_error_compatible(cupy_error, numpy_error):
      """Checks if try/except blocks are equivalent up to public error classes"""
  
      return all(
          isinstance(cupy_error, err) == isinstance(numpy_error, err)
          for err in _numpy_errors
      )
  
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 6 for calling a global function with example usage: _check_numpy_cupy_error_compatible(cupy_error, numpy_error) and returns: all