code: def cancelAllPendingResults( self ):
          
  
          # grab all the pending job ids
          jobs = self.pendingResults()
          
          if len(jobs) > 0:
              # abort in the cluster
              self._abortJobs(jobs)
              
              # cancel in the notebook                  
              self.notebook().cancelAllPendingResults()
docs: Cancel all pending results.