def _finish_sumatra(self):
finish_time = self._start_timestamp - self._finish_timestamp<EOL>self._sumatra_record.duration = finish_time<EOL>self._sumatra_record.output_data = self._sumatra_record.datastore.find_new_data(<EOL>self._sumatra_record.timestamp)<EOL>self._loaded_sumatatra_project.add_record(self._sumatra_record)<EOL>self._loaded_sumatatra_project.save()<EOL>sumatra_label = self._sumatra_record.label<EOL>config_name = '<STR_LIT>' % str(sumatra_label)<EOL>conf_list = []<EOL>if not self._traj.f_contains('<STR_LIT>' + config_name):<EOL><INDENT>conf1 = self._traj.f_add_config(Parameter, config_name, str(sumatra_label),<EOL>comment='<STR_LIT>')<EOL>conf_list.append(conf1)<EOL><DEDENT>if self._sumatra_reason:<EOL><INDENT>config_name = '<STR_LIT>' % str(sumatra_label)<EOL>if not self._traj.f_contains('<STR_LIT>' + config_name):<EOL><INDENT>conf2 = self._traj.f_add_config(Parameter, config_name,<EOL>str(self._sumatra_reason),<EOL>comment='<STR_LIT>')<EOL>conf_list.append(conf2)<EOL><DEDENT><DEDENT>if self._automatic_storing and conf_list:<EOL><INDENT>self._traj.f_store_items(conf_list)<EOL><DEDENT>self._logger.info('<STR_LIT>'<EOL>'<STR_LIT:%s>' % str(self._sumatra_reason))<EOL>
Saves a sumatra record