class_docstr: A setting that indicates which subdirectories should be excluded from an operation
  
  The subdirectory filter holds a collection of subdirectories that
  should be excluded from a file discovery operation that scans
  subdirectories.
code: def test_valid(self, pipeline):
      if self.directory_path is not None:
          root = self.directory_path.get_absolute_path()
          for subdirectory in self.get_selections():
              path = os.path.join(root, subdirectory)
              if not os.path.isdir(path):
                  raise ValidationError(
                      "%s is not a valid directory" % path, self
                  )
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/setting/multichoice/_subdirectory_filter.py
imports: import os
  from ._multichoice import MultiChoice
  from .._validation_error import ValidationError
  from ..text import Directory
label_desc: Use image node_id 4 for calling the SubdirectoryFilter obj's underlying member method code with example usage: obj.test_valid(pipeline) without return types