code: def validate_impact_function(self):
          
          # Always set it to False
          self.btn_run.setEnabled(False)
  
          for combo in list(self.combos_exposures.values()):
              if combo.count() == 1:
                  combo.setEnabled(False)
  
          hazard = layer_from_combo(self.cbx_hazard)
          aggregation = layer_from_combo(self.cbx_aggregation)
          exposures = []
          for combo in list(self.combos_exposures.values()):
              exposures.append(layer_from_combo(combo))
          exposures = [layer for layer in exposures if layer]
  
          multi_exposure_if = MultiExposureImpactFunction()
          multi_exposure_if.hazard = hazard
          multi_exposure_if.exposures = exposures
          multi_exposure_if.debug = False
          multi_exposure_if.callback = self.progress_callback
          if aggregation:
              multi_exposure_if.use_selected_features_only = (
                  self.use_selected_only)
              multi_exposure_if.aggregation = aggregation
          else:
              multi_exposure_if.crs = (
                  self.iface.mapCanvas().mapSettings().destinationCrs())
          if len(self.ordered_expected_layers()) != 0:
              self._multi_exposure_if.output_layers_ordered = (
                  self.ordered_expected_layers())
  
          status, message = multi_exposure_if.prepare()
          if status == PREPARE_SUCCESS:
              self._multi_exposure_if = multi_exposure_if
              self.btn_run.setEnabled(True)
              send_static_message(self, ready_message())
              self.list_layers_in_map_report.clear()
              return
          else:
              disable_busy_cursor()
              send_error_message(self, message)
              self._multi_exposure_if = None
docs: Check validity of the current impact function.