def create_iteration(self, num_suggestions):
from db.models.experiment_groups import ExperimentGroupIteration<EOL>iteration_config = self.experiment_group.iteration_config<EOL>if iteration_config is None:<EOL><INDENT>iteration = <NUM_LIT:0><EOL>old_experiment_ids = None<EOL>old_experiments_configs = None<EOL>old_experiments_metrics = None<EOL><DEDENT>else:<EOL><INDENT>iteration = iteration_config.iteration + <NUM_LIT:1><EOL>old_experiment_ids = iteration_config.combined_experiment_ids<EOL>old_experiments_configs = iteration_config.combined_experiments_configs<EOL>old_experiments_metrics = iteration_config.combined_experiments_metrics<EOL><DEDENT>iteration_config = BOIterationConfig(<EOL>iteration=iteration,<EOL>num_suggestions=num_suggestions,<EOL>old_experiment_ids=old_experiment_ids,<EOL>old_experiments_configs=old_experiments_configs,<EOL>old_experiments_metrics=old_experiments_metrics,<EOL>experiment_ids=[],<EOL>experiments_configs=[],<EOL>)<EOL>return ExperimentGroupIteration.objects.create(<EOL>experiment_group=self.experiment_group,<EOL>data=iteration_config.to_dict())<EOL>
Create an iteration for the experiment group.