code: def get_parent_mode_constraints(self):
          
          h, e, _hc, _ec = self.selected_impact_function_constraints()
          if self.parent_step in [self.step_fc_hazlayer_from_canvas,
                                  self.step_fc_hazlayer_from_browser]:
              category = layer_purpose_hazard
              subcategory = h
          elif self.parent_step in [self.step_fc_explayer_from_canvas,
                                    self.step_fc_explayer_from_browser]:
              category = layer_purpose_exposure
              subcategory = e
          elif self.parent_step:
              category = layer_purpose_aggregation
              subcategory = None
          else:
              category = None
              subcategory = None
          return category, subcategory
docs: Return the category and subcategory keys to be set in the
          subordinate mode.
  
          :returns: (the category definition, the hazard/exposure definition)
          :rtype: (dict, dict)