def METHOD_NAME():
    # Make sure exception state is cleaned up as soon as the except
    # block is left.
    class MyException(Exception):
        def __init__(self, obj):
            # This is on purpose not called, pylint: disable=super-init-not-called
            self.obj = obj
    class MyObj:
        pass
    def inner_raising_func():
        local_ref = obj
        raise MyException(obj)
    # "except" block raising another exception
    obj = MyObj()
    try:
        try:
            inner_raising_func()
        except:
            raise KeyError
    except KeyError as e:  # on purpose, pylint: disable=unused-variable
        pass