code: def assert_raises(
      exception, *args, glob=None, regex=None, match_case=None, **kwargs
  ):
      """
      Wrapper combining `nose.tools.assert_raises` and `nose.tools.assert_raises_regex`.
      Specify ``regex=pattern`` or ``glob=pattern`` to check error message of expected exception
      against the pattern.
      Value for `glob` must be a string, `regex` can be either a literal or compiled regex pattern.
      By default, the check will ignore case, if called with `glob` or a literal for `regex`.
      To enforce case sensitive check pass ``match_case=True``.
      Don't specify `match_case` if passing already compiled regex pattern.
      """
  
      if glob is None and regex is None:
          return tools.assert_raises(exception, *args, **kwargs)
  
      pattern = get_pattern(glob, regex, match_case)
      return tools.assert_raises_regex(
          exception, pattern, *args, **kwargs
      )
  
file_path: DALI/dali/test/python/nose_utils.py
imports: import sys
  import collections
  import nose.case
  import nose.inspector
  import nose.loader
  import nose.suite
  import nose.plugins.attrib
  import nose.tools
  import re
  import fnmatch
label_desc: Use image node_id 3 for calling a global function with example usage: assert_raises(exception) and returns: tools, tools