code: def test_dtype_context_manager():
      # regular issue
      assert torch.get_default_dtype() is torch.float32
      with _DtypeContextManager(torch.float16):
          assert torch.get_default_dtype() is torch.float16
  
      # exception
      assert torch.get_default_dtype() is torch.float32
      with pytest.raises(
          RuntimeError, match="foo"
      ), _DtypeContextManager(torch.float16):
          assert torch.get_default_dtype() is torch.float16
          raise RuntimeError("foo")
      assert torch.get_default_dtype() is torch.float32
  
imports: import pytest
  import torch
  from lightning.fabric.plugins.precision.utils import _ClassReplacementContextManager, _DtypeContextManager
label_desc: Use image node_id 1 for calling a global function with example usage: test_dtype_context_manager() without return types