code: def test_context_meter_clear_callbacks_raises():
      def raises(*args):
          raise RuntimeError("hello")
  
      with metrics.context_meter.add_callback(raises):
          with pytest.raises(RuntimeError, match="hello"):
              metrics.context_meter.digest_metric("foo", 1, "s")
  
          with pytest.raises(
              IndexError
          ), metrics.context_meter.clear_callbacks():
              raise IndexError()
  
          with pytest.raises(RuntimeError, match="hello"):
              metrics.context_meter.digest_metric("foo", 1, "s")
  
imports: from __future__ import annotations
  import math
  import pickle
  import threading
  import time
  import pytest
  from distributed import metrics
  from distributed.compatibility import WINDOWS
  from distributed.utils import offload
  from distributed.utils_test import gen_test
label_desc: Use image node_id 13 for calling a global function with example usage: test_context_meter_clear_callbacks_raises() without return types