def METHOD_NAME(self):
    # Attempting to clear an executing frame is forbidden.
    try:
        1/0
    except ZeroDivisionError as e:
        f = e.__traceback__.tb_frame
    with self.assertRaises(RuntimeError):
        f.clear()
    with self.assertRaises(RuntimeError):
        f.f_back.clear()