update model_selection_leave_out_data
write it as a function. Add some annotations, the meaning of parameters.