code: def test_from_json_errors(
      self, value: types.JsonDict, expected_error
  ):
      with self.assertRaises(expected_error):
          _ = types.LitType.from_json(value)
  
imports: from collections.abc import Callable
  import os
  from typing import Any, Optional, Union
  from absl.testing import absltest
  from absl.testing import parameterized
  from etils import epath
  from lit_nlp.api import dtypes
  from lit_nlp.api import types
  import numpy
label_desc: Use image node_id 10 for calling the TypesTest obj's underlying member method code with example usage: obj.test_from_json_errors(value, expected_error) without return types