class_docstr: A setting that displays a filesystem path name
      
class_docstr_tok: ["A","setting","that","displays","a","filesystem","path","name"]
code: def test_valid(self, pipeline):
      if self.dir_choice not in self.dir_choices + [NO_FOLDER_NAME]:
          raise ValidationError(
              "Unsupported directory choice: %s" % self.dir_choice, self
          )
      if (
          not self.allow_metadata
          and self.is_custom_choice
          and self.custom_path.find(r"\g<") != -1
      ):
          raise ValidationError(
              "Metadata not supported for this setting", self
          )
      if self.dir_choice == ABSOLUTE_FOLDER_NAME and (
          (self.custom_path is None) or (len(self.custom_path) == 0)
      ):
          raise ValidationError("Please enter a valid path", self)
  
imports: import os
  import sys
  from ._text import Text
  from .._validation_error import ValidationError
  from ...preferences import ABSOLUTE_FOLDER_NAME
  from ...preferences import DEFAULT_INPUT_FOLDER_NAME
  from ...preferences import DEFAULT_INPUT_SUBFOLDER_NAME
  from ...preferences import DEFAULT_OUTPUT_FOLDER_NAME
  from ...preferences import DEFAULT_OUTPUT_SUBFOLDER_NAME
  from ...preferences import NO_FOLDER_NAME
  from ...preferences import URL_FOLDER_NAME
  from ...preferences import get_default_image_directory
  from ...preferences import get_default_output_directory
  from ...preferences import standardize_default_folder_names
label_desc: Use image node_id 17 for calling the Directory obj's underlying member method code with example usage: obj.test_valid(pipeline) without return types