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"""
      if self.operand_choice in (O_BINARY_IMAGE, O_BOTH):
          images = set()
          if len(self.images_list.value) == 0:
              raise ValidationError(
                  "No images selected", self.images_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)
      if self.operand_choice in (O_OBJECTS, O_BOTH):
          objects = set()
          if len(self.objects_list.value) == 0:
              raise ValidationError(
                  "No objects selected", self.objects_list
              )
          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 numpy
  import skimage.measure
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  from cellprofiler_core.module import Module
  from cellprofiler_core.setting import Divider, ValidationError
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.subscriber import ImageListSubscriber, LabelListSubscriber
label_desc: Use image node_id 2 for calling the MeasureImageAreaOccupied obj's underlying member method code with example usage: obj.validate_module(pipeline) without return types