code: def test_enumstr(self):
      cp = configparser.EnumStr("blue", ["red", "green", "yellow"])
      assert len(cp.all) == 4
      with pytest.raises(ValueError, match=r"Invalid value \('foo'\)"):
          cp.apply("foo")
      with pytest.raises(ValueError, match="Non-str value"):
          configparser.EnumStr(
              default="red", options=["red", 12, "yellow"]
          )
  
imports: import configparser
  import io
  import pickle
  import pytest
  from pytensor import configdefaults, configparser
  from pytensor.configdefaults import short_platform
  from pytensor.configparser import ConfigParam
label_desc: Use image node_id 2 for calling the TestConfigTypes obj's underlying member method code with example usage: obj.test_enumstr() without return types