code: def assert_exceptions_equal(
      lfunc,
      rfunc,
      lfunc_args_and_kwargs=None,
      rfunc_args_and_kwargs=None,
      check_exception_type=True,
  ):
      """Compares if two functions ``lfunc`` and ``rfunc`` raise
      same exception or not.
  
      Parameters
      ----------
      lfunc : callable
          A callable function to obtain the Exception.
      rfunc : callable
          A callable function to compare the Exception
          obtained by calling ``rfunc``.
      lfunc_args_and_kwargs : tuple, default None
          Tuple containing positional arguments at first position,
          and key-word arguments at second position that need to be passed into
          ``lfunc``. If the tuple is of length 1, it must either contain
          positional arguments(as a Sequence) or key-word arguments(as a Mapping
          dict).
      rfunc_args_and_kwargs : tuple, default None
          Tuple containing positional arguments at first position,
          and key-word arguments at second position that need to be passed into
          ``rfunc``. If the tuple is of length 1, it must either contain
          positional arguments(as a Sequence) or key-word arguments(as a Mapping
          dict).
      check_exception_type : boolean, default True
          Whether to compare the exception types raised by ``lfunc``
          with ``rfunc`` exception type or not. If False, ``rfunc``
          is simply evaluated against `Exception` type.
  
      Returns
      -------
      None
          If exceptions raised by ``lfunc`` and
          ``rfunc`` match.
  
      Raises
      ------
      AssertionError
          If call to ``lfunc`` doesn't raise any Exception.
      """
  
      lfunc_args, lfunc_kwargs = _get_args_kwars_for_assert_exceptions(
          lfunc_args_and_kwargs
      )
      rfunc_args, rfunc_kwargs = _get_args_kwars_for_assert_exceptions(
          rfunc_args_and_kwargs
      )
  
      try:
          lfunc(*lfunc_args, **lfunc_kwargs)
      except KeyboardInterrupt:
          raise
      except Exception as e:
          with pytest.raises(
              type(e) if check_exception_type else Exception
          ):
              rfunc(*rfunc_args, **rfunc_kwargs)
      else:
          raise AssertionError("Expected to fail with an Exception.")
  
imports: import itertools
  import string
  import warnings
  from collections import abc
  from contextlib import contextmanager
  from decimal import Decimal
  import cupy
  import numpy
  import pandas
  import pytest
  from numba.core.typing import signature
  from numba.core.typing.templates import AbstractTemplate
  from numba.cuda.cudadecl import registry
  from numba.cuda.cudaimpl import lower
  from pandas import testing
  import cudf
  from cudf._lib.null_mask import bitmask_allocation_size_bytes
  from cudf.api.types import is_scalar
  from cudf.core.column.timedelta import _unit_to_nanoseconds_conversion
  from cudf.core.udf.strings_lowering import cast_string_view_to_udf_string
  from cudf.core.udf.strings_typing import StringView, string_view, udf_string
  from cudf.utils import dtypes
label_desc: Use image node_id 7 for calling a global function with example usage: assert_exceptions_equal(lfunc, rfunc, lfunc_args_and_kwargs, rfunc_args_and_kwargs, check_exception_type) without return types