docstr: Test the module settings to make sure they are internally consistent
docstr_tok: ["Test","the","module","settings","to","make","sure","they","are","internally","consistent"]
code: def validate_module(self, pipeline):
      """Test the module settings to make sure they are internally consistent"""
      if len(
          self.delimiter.value
      ) != 1 and not self.delimiter.value in (
          DELIMITER_TAB,
          DELIMITER_COMMA,
      ):
          raise ValidationError(
              "The CSV field delimiter must be a single character",
              self.delimiter,
          )
  
      """Make sure metadata tags exist"""
      for group in self.object_groups:
          if not group.wants_automatic_file_name:
              text_str = group.file_name.value
              undefined_tags = pipeline.get_undefined_metadata_tags(
                  text_str
              )
              if len(undefined_tags) > 0:
                  raise ValidationError(
                      "%s is not a defined metadata tag. Check the metadata specifications in your load modules"
                      % undefined_tags[0],
                      group.file_name,
                  )
  
      """Check if image features are exported if GCTs are being made"""
      if self.wants_genepattern_file:
          measurement_columns = pipeline.get_measurement_columns()
          image_features = self.filter_columns(
              [x[1] for x in measurement_columns if x[0] == IMAGE],
              IMAGE,
          )
          name_feature, _ = self.validate_image_features_exist(
              image_features,
          )
  
          if name_feature == []:
              raise ValidationError(
                  "At least one path measurement plus the feature selected in 'Select source of sample row name' must be enabled for GCT file creation. Use 'Press button to select measurements' to enable these measurements, or set 'Select measurements to export' to No.",
                  self.wants_genepattern_file,
              )
  
imports: import base64
  import csv
  import logging
  import os
  import numpy
  from cellprofiler_core.constants.image import C_MD5_DIGEST, C_SCALING, C_HEIGHT, C_WIDTH
  from cellprofiler_core.constants.measurement import EXPERIMENT, IMAGE, AGG_MEAN, AGG_MEDIAN, AGG_STD_DEV, C_URL, C_PATH_NAME, C_FILE_NAME, NEIGHBORS, R_FIRST_IMAGE_NUMBER, R_SECOND_IMAGE_NUMBER, R_FIRST_OBJECT_NUMBER, R_SECOND_OBJECT_NUMBER
  from cellprofiler_core.constants.module import IO_FOLDER_CHOICE_HELP_TEXT, IO_WITH_METADATA_HELP_TEXT, USING_METADATA_HELP_REF, USING_METADATA_TAGS_REF
  from cellprofiler_core.constants.pipeline import EXIT_STATUS
  from cellprofiler_core.measurement import Measurements
  from cellprofiler_core.module import Module
  from cellprofiler_core.preferences import ABSOLUTE_FOLDER_NAME
  from cellprofiler_core.preferences import DEFAULT_INPUT_FOLDER_NAME
  from cellprofiler_core.preferences import DEFAULT_INPUT_SUBFOLDER_NAME
  from cellprofiler_core.preferences import DEFAULT_OUTPUT_FOLDER_NAME
  from cellprofiler_core.preferences import DEFAULT_OUTPUT_SUBFOLDER_NAME
  from cellprofiler_core.preferences import get_headless
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting import Divider
  from cellprofiler_core.setting import Measurement
  from cellprofiler_core.setting import SettingsGroup
  from cellprofiler_core.setting import ValidationError
  from cellprofiler_core.setting.choice import CustomChoice, Choice
  from cellprofiler_core.setting.do_something import DoSomething, RemoveSettingButton
  from cellprofiler_core.setting.multichoice import MeasurementMultiChoice
  from cellprofiler_core.setting.subscriber import ImageSubscriber, LabelSubscriber
  from cellprofiler_core.setting.text import Directory, Text
  from cellprofiler_core.utilities.core.modules.load_data import is_file_name_feature, is_path_name_feature
  from cellprofiler_core.utilities.measurement import find_metadata_tokens, get_agg_measurement_name
  from cellprofiler.gui.help.content import MEASUREMENT_NAMING_HELP
label_desc: Use image node_id 6 for calling the ExportToSpreadsheet obj's underlying member method code with example usage: obj.validate_module(pipeline) without return types