def run_model(*params, return_preds=False, integrate=False):
    """
    Given a model, loss function and daily death data, along with the parameters, run the model on these parameters.

    Arguments
    --------------
    params        : A list of parameters. The last three must be the model function, loss function and daily death data
    return_preds  : If False the function only returns the loss otherwise it returns both the loss and predictions
    integrate     : Doesn't do anything, present for compatibility reasons

    Returns
    --------------
    If return_preds = False, returns a single scalar value - the loss between the model predictions and actual data. 
    If return_preds = True, returns a tuple of the loss and predictions made by the model
    """

    model, loss_fun, daily_deaths = params[-3:]
    
    offset = int(params[0][0])
    t_max = daily_deaths[offset:].shape[0] - 1
    preds = model(t_max, *params[0], integrate=integrate)

    loss = loss_fun(preds, daily_deaths[offset:])
    
    if not return_preds:
        return loss
    else:
        return loss, preds