def updateResults( self ):
<EOL>nb = self.notebook()<EOL>n = <NUM_LIT:0><EOL>if nb.numberOfPendingResults() > <NUM_LIT:0>:<EOL><INDENT>self.open()<EOL>for j in set(nb.pendingResults()):<EOL><INDENT>status = self._client.result_status(j, status_only = False)<EOL>if j in status['<STR_LIT>']:<EOL><INDENT>r = status[j]<EOL>nb.addResult(r, j)<EOL>nb.commit()<EOL>self._client.purge_hub_results(j)<EOL>n = n + <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT>return n<EOL>
Update our results within any pending results that have completed since we
        last retrieved results from the cluster.

        :returns: the number of pending results completed at this call