code: def get_current_state(self):
          
          def clean_state(dictionary):
              """Clean dictionary from bad value.
  
              :param dictionary: Dictionary of value maps or thresholds.
              :type dictionary: dict
  
              :returns: Clean state.
              :rtype: dict
              """
              clean_dictionary = {
                  k: v for k, v in list(dictionary.items())
                  if isinstance(v, dict)}
  
              return clean_dictionary
  
          if self.layer_mode == layer_mode_continuous:
              output = {'thresholds': clean_state(self.thresholds)}
              key = 'thresholds'
          else:
              output = {'value_maps': clean_state(self.value_maps)}
              key = 'value_maps'
  
          # Clean non existing hazard class key
          empty_exposure_classifications = []
          for the_exposure, the_hazard_classifications in list(
                  output[key].items()):
              for the_hazard_classification in list(the_hazard_classifications.
                                                    keys()):
                  invalid_classifications = []
                  if not definition(the_hazard_classification):
                      invalid_classifications.append(
                          the_hazard_classification)
                  for invalid_classification in invalid_classifications:
                      the_hazard_classifications.pop(invalid_classification)
              if not the_hazard_classifications:
                  empty_exposure_classifications.append(the_exposure)
  
          for empty_exposure_classification in empty_exposure_classifications:
              output[key].pop(empty_exposure_classification)
  
          return output
docs: Obtain current classification and value map / threshold.