code: def assertRaises(ex_type):
      try:
          yield
          assert False, f"expected {ex_type}"
      except BaseException as ex:
          if isinstance(ex, AssertionError):
              raise
          assert type(ex) is ex_type, f"{ex} should be {ex_type}"
  
imports: import contextlib
  import os
  import sys
label_desc: Use image node_id 5 for calling a global function with example usage: assertRaises(ex_type) without return types