def copy_experiment(experiment):
try:<EOL><INDENT>publisher.publish_experiment_job_log(<EOL>log_lines='<STR_LIT>'.format(<EOL>experiment.original_experiment.unique_name, experiment.unique_name<EOL>),<EOL>experiment_uuid=experiment.uuid.hex,<EOL>experiment_name=experiment.unique_name,<EOL>job_uuid='<STR_LIT:all>',<EOL>)<EOL>stores.copy_experiment_outputs(<EOL>persistence_outputs_from=experiment.original_experiment.persistence_outputs,<EOL>persistence_outputs_to=experiment.persistence_outputs,<EOL>experiment_name_from=experiment.original_experiment.unique_name,<EOL>experiment_name_to=experiment.unique_name)<EOL><DEDENT>except OSError:<EOL><INDENT>publisher.publish_experiment_job_log(<EOL>log_lines='<STR_LIT>'.format(<EOL>experiment.original_experiment.unique_name, experiment.unique_name<EOL>),<EOL>experiment_uuid=experiment.uuid.hex,<EOL>experiment_name=experiment.unique_name,<EOL>job_uuid='<STR_LIT:all>',<EOL>)<EOL>_logger.warning(<EOL>'<STR_LIT>',<EOL>experiment.original_experiment.unique_name, experiment.unique_name)<EOL><DEDENT>
If experiment is a restart, we should resume from last check point