code: def test_strict_key_values(self) -> None:
      class FooSpatialUnits(HasProps):
          x = bcpd.DistanceSpec("x")
  
      f = FooSpatialUnits()
      f.x = dict(field="foo", units="screen")
      with pytest.raises(ValueError):
          f.x = dict(field="foo", units="junk", foo="crap")
  
      class FooAngleUnits(HasProps):
          x = bcpd.AngleSpec("x")
  
      f = FooAngleUnits()
      f.x = dict(field="foo", units="deg")
      with pytest.raises(ValueError):
          f.x = dict(field="foo", units="junk", foo="crap")
  
imports: from __future__ import annotations
  import pytest
  import datetime
  import warnings
  from copy import copy
  import numpy
  import pandas
  from bokeh.core.has_props import HasProps, Local
  from bokeh.core.property.vectorization import Field, Value, field, value
  from tests.support.util.api import verify_all
  import bokeh.core.property.dataspec
label_desc: Use image node_id 1 for calling the Test_UnitSpec obj's underlying member method code with example usage: obj.test_strict_key_values() without return types