code: def assertRaises(etype):
      """This works in Python 2.6 too"""
      try:
          yield
      except etype:
          pass
      else:
          raise Exception("Expected %s" % etype.__name__)
  
imports: from __future__ import absolute_import
  import sys
  import doctest
  import unittest
  import decimal
  import inspect
  import functools
  import collections
  from collections import defaultdict
  from decorator import dispatch_on, contextmanager, decorator
label_desc: Use image node_id 1 for calling a global function with example usage: assertRaises(etype) without return types