code: def test_from_json(
      self, json_dict: types.JsonDict, expected_type: types.LitType
  ):
      lit_type: types.LitType = types.LitType.from_json(json_dict)
      self.assertIsInstance(lit_type, expected_type)
      for key in json_dict:
          if key == "__name__":
              continue
          elif hasattr(lit_type, key):
              self.assertEqual(getattr(lit_type, key), json_dict[key])
          else:
              self.fail(
                  f"Encountered unknown property {key} for type "
                  f"{lit_type.__class__.__name__}."
              )
  
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 9 for calling the TypesTest obj's underlying member method code with example usage: obj.test_from_json(json_dict, expected_type) without return types