code: def set_result(self, job_id, result):
          
          with self._conn:
              try:
                  self._conn.execute(
                      '''
                      REPLACE INTO results
                      VALUES (?, ?, ?, ?, ?)
                      ''', _work_result_to_row(job_id, result))
              except sqlite3.IntegrityError as exc:
                  raise KeyError('Can not add result with job-id {}'.format(
                      job_id)) from exc
docs: Set the result for a job.
  
          This will overwrite any existing results for the job.
  
          Args:
            job_id: The ID of the WorkItem to set the result for.
            result: A WorkResult indicating the result of the job.
  
          Raises:
             KeyError: If there is no work-item with a matching job-id.