<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_additional_model(self, model_list_or_dict, core_objects_dict, model_name, model_key, destroy=True):
 """Remove one unnecessary model The method will search for the first model-object out of model_list_or_dict that represents no core-object in the dictionary of core-objects handed by core_objects_dict, remove it and return without continue to search for more model-objects which maybe are unnecessary, too. :param model_list_or_dict: could be a list or dictionary of one model type :param core_objects_dict: dictionary of one type of core-elements (rafcon.core) :param model_name: prop_name for the core-element hold by the model, this core-element is covered by the model :param model_key: if model_list_or_dict is a dictionary the key is the id of the respective element (e.g. 'state_id') :return: """

        if model_name == "income":
            self.income.prepare_destruction()
            self.income = None
            return

        for model_or_key in model_list_or_dict:
            model = model_or_key if model_key is None else model_list_or_dict[model_or_key]
            found = False
            for core_object in core_objects_dict.values():
                if core_object is getattr(model, model_name):
                    found = True
                    break
            if not found:
                if model_key is None:
                    if destroy:
                        model.prepare_destruction()
                    model_list_or_dict.remove(model)
                else:
                    if destroy:
                        model_list_or_dict[model_or_key].prepare_destruction()
                    del model_list_or_dict[model_or_key]
                return