def _trigger_result_snapshot(self, result):
        """ Triggers a snapshot of the results for continuing

        :param result: Currently computed result

        """
        timestamp = result[1]['finish_timestamp']
        timestamp_str = repr(timestamp).replace('.', '_')
        filename = 'result_%s' - timestamp_str
        extension = '.ncnt'
        dump_filename = os.path.join(self._resume_path, filename + extension)

        dump_file = open(dump_filename, 'wb')
        dill.dump(result, dump_file, protocol=2)
        dump_file.flush()
        dump_file.close()

        # We rename the file to be certain that the trajectory did not crash during taking
        # the snapshot!
        extension = '.rcnt'
        rename_filename = os.path.join(self._resume_path, filename + extension)
        shutil.move(dump_filename, rename_filename)
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/environment.py/Environment._trigger_result_snapshot/operator `%` -> `-`