class_docstr: A setting that takes its value from one made available by name providers
      
class_docstr_tok: ["A","setting","that","takes","its","value","from","one","made","available","by","name","providers"]
code: def test_valid(self, pipeline):
      choices = self.get_choices(pipeline)
      if len(choices) == 0:
          raise ValidationError(
              "No prior instances of %s were defined" % self.group, self
          )
      if self.value not in [c[0] for c in choices]:
          raise ValidationError(
              "%s not in %s"
              % (
                  self.value,
                  ", ".join(c[0] for c in self.get_choices(pipeline)),
              ),
              self,
          )
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/setting/subscriber/_subscriber.py
imports: from .._setting import Setting
  from .._validation_error import ValidationError
  from ...constants.setting import get_name_provider_choices
label_desc: Use image node_id 6 for calling the Subscriber obj's underlying member method code with example usage: obj.test_valid(pipeline) without return types