code: def save_models(self, models_file):
          
          if self.model_parameters_iterations is None:
              raise ValueError("No iterations have been carried out yet and hence no iterations of the BO can be saved")
  
          iterations = np.array(range(1,self.model_parameters_iterations.shape[0]+1))[:,None]
          results = np.hstack((iterations,self.model_parameters_iterations))
          header = ['Iteration'] + self.model.get_model_parameters_names()
  
          data = [header] + results.tolist()
          self._write_csv(models_file, data)
docs: Saves model parameters at each iteration of the optimization
  
          :param models_file: name of the file or a file buffer, in which the results are saved.