<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_core_elements_of_models(models, raise_exceptions=True, recursive=True, destroy=True, force=False):
 """Deletes all respective core elements for the given models Calls the :func:`delete_core_element_of_model` for all given models. :param models: A single model or a list of models of respective core element to be deleted :param bool raise_exceptions: Whether to raise exceptions or log error messages in case of an error :param bool destroy: Access the destroy flag of the core remove methods :return: The number of models that were successfully deleted """

    # If only one model is given, make a list out of it
    if not hasattr(models, '__iter__'):
        models = [models]
    return sum(delete_core_element_of_model(model, raise_exceptions, recursive=recursive, destroy=destroy, force=force)
               for model in models)