code: def cancel(self, *ids):
  		
  		ncancelled = 0
  		with self.lock:
  			for id in ids:
  				try:
  					if self._status[id] == 'SUBMITTED':
  						self._status[id] = 'CANCELLED'
  						ncancelled += 1
  				except IndexError:
  					pass
  		return ncancelled
docs: Try to cancel jobs with associated ids.
  		
  		Return the actual number of jobs cancelled.