code: def addPendingResult( self, ps, jobid ):
          
          k = self._parametersAsIndex(ps)
  
          # retrieve or create the result list
          if k in self._results.keys():
              rs = self._results[k]
          else:
              rs = []
              self._results[k] = rs
  
          # append the pending result's jobid
          rs.insert(0, jobid)
  
          # map job id to parameters to which it refers
          self._pending[jobid] = k
docs: Add a "pending" result that we expect to get results for.
  
          :param ps: the parameters for the result
          :param jobid: an identifier for the pending result