are the model and ensemble cases different enough to warrant creating two separate functions and making this one just choose which one to call? (i.e., having 3 smallish functions?)