code: def cancelPendingResult( self, jobid ):
          
          if jobid in self._pending.keys():
              k = self._pending[jobid]
              del self._pending[jobid]
              if k in self._results.keys():
                  rs = self._results[k]
                  j = rs.index(jobid)
                  del rs[j]
              else:
                  # we've screwed-up the internal data structures
                  raise RuntimeError('Internal structure error for {j} -> {ps}'.format(j = jobid,
                                                                                       ps = k))
          else:
              # no such job
              # sd: should this just fail silently?
              raise KeyError('No pending result with id {j}'.format(j = jobid))
docs: Cancel a particular pending result. Note that this only affects the
          notebook's record, not any job running in a lab.
  
          :param jobid: job id for pending result