class_docstr: A setting that displays a drop-down set of choices
  
      
class_docstr_tok: ["A","setting","that","displays","a","drop-down","set","of","choices"]
docstr: Check to make sure that the value is among the choices
docstr_tok: ["Check","to","make","sure","that","the","value","is","among","the","choices"]
code: def test_valid(self, pipeline):
      """Check to make sure that the value is among the choices"""
      if self.__choices_fn is not None:
          self.__choices = self.__choices_fn(pipeline)
      if self.value not in self.choices:
          raise ValidationError(
              "%s is not one of %s"
              % (self.value, ",".join(self.choices)),
              self,
          )
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/setting/choice/_choice.py
imports: from enum import Enum
  from .._setting import Setting
  from .._validation_error import ValidationError
label_desc: Use image node_id 8 for calling the Choice obj's underlying member method code with example usage: obj.test_valid(pipeline) without return types