docstr: Make sure chosen objects and images are selected only once
docstr_tok: ["Make","sure","chosen","objects","and","images","are","selected","only","once"]
code: def validate_module(self, pipeline):
      """Make sure chosen objects and images are selected only once"""
      images = set()
      if len(self.images_list.value) == 0:
          raise ValidationError("No images selected", self.images_list)
      elif len(self.objects_list.value) == 0:
          raise ValidationError(
              "No objects selected", self.objects_list
          )
      for image_name in self.images_list.value:
          if image_name in images:
              raise ValidationError(
                  "%s has already been selected" % image_name,
                  image_name,
              )
          images.add(image_name)
  
      objects = set()
      for object_name in self.objects_list.value:
          if object_name in objects:
              raise ValidationError(
                  "%s has already been selected" % object_name,
                  object_name,
              )
          objects.add(object_name)
  
imports: import centrosome.cpmorphology
  import centrosome.filter
  import centrosome.outline
  import numpy
  import scipy.ndimage
  import skimage.segmentation
  from cellprofiler_core.constants.measurement import C_LOCATION, COLTYPE_FLOAT
  from cellprofiler_core.module import Module
  from cellprofiler_core.setting import Divider, ValidationError
  from cellprofiler_core.setting.subscriber import ImageListSubscriber, LabelListSubscriber
  from cellprofiler_core.utilities.core.object import crop_labels_and_image
  from cellprofiler.modules import _help
label_desc: Use image node_id 5 for calling the MeasureObjectIntensity obj's underlying member method code with example usage: obj.validate_module(pipeline) without return types