code: def test_convert_precision_str_to_dtype_throws(self) -> None:
      with self.assertRaisesRegex(
          ValueError,
          "Precision foo not supported. Please use one of .*",
      ):
          convert_precision_str_to_dtype("foo")
  
file_path: tnt/tests/utils/test_precision.py
imports: import unittest
  from unittest.mock import patch
  import torch
  from torch.cuda.amp.grad_scaler import GradScaler
  from torch.distributed.fsdp.sharded_grad_scaler import ShardedGradScaler
  from torchtnt.utils.precision import convert_precision_str_to_dtype, get_grad_scaler_from_precision
label_desc: Use image node_id 2 for calling the PrecisionTest obj's underlying member method code with example usage: obj.test_convert_precision_str_to_dtype_throws() without return types