code: def test_enum(self) -> None:
      class Foo(HasProps):
          x = Enum(
              "blue", "red", "green"
          )  # the first item is the default
          y = Enum("small", "medium", "large", default="large")
  
      f = Foo()
      assert f.x == "blue"
      assert f.y == "large"
  
      f.x = "red"
      assert f.x == "red"
  
      with pytest.raises(ValueError):
          f.x = "yellow"
  
      f.y = "small"
      assert f.y == "small"
  
      with pytest.raises(ValueError):
          f.y = "yellow"
  
imports: from __future__ import annotations
  import pytest
  import numpy
  from bokeh.core.has_props import HasProps, Local
  from bokeh.core.properties import Alias, Dict, Enum, Float, Instance, Int, List, NotSerialized, Nullable, NumberSpec, Override, Readonly, String, UnsetValueError
  from bokeh.model import Model
  from tests.support.util.api import verify_all
  import bokeh.core.properties
label_desc: Use image node_id 2 for calling the TestBasic obj's underlying member method code with example usage: obj.test_enum() without return types