code: def test_annotation_cleared_on_error():
      with dask.annotate(x=1):
          with pytest.raises(ZeroDivisionError):
              with dask.annotate(x=2):
                  assert dask.get_annotations() == {"x": 2}
                  1 / 0
          assert dask.get_annotations() == {"x": 1}
      assert not dask.get_annotations()
  
imports: from __future__ import annotations
  import os
  import threading
  import xml.etree.ElementTree
  from collections.abc import Set
  from concurrent.futures import ThreadPoolExecutor
  import pytest
  import dask
  from dask.blockwise import Blockwise, blockwise_token
  from dask.highlevelgraph import HighLevelGraph, Layer, MaterializedLayer, to_graphviz
  from dask.utils_test import inc
label_desc: Use image node_id 12 for calling a global function with example usage: test_annotation_cleared_on_error() without return types