'Remove a previously scheduled task.
Raises:
KeyError: if task is not found'

def remove(self, task):

    entry = self._task_map.pop(task)
    (task, future) = entry[(-1)]
    future.failure(Errors.Cancelled)
    entry[(-1)] = 'REMOVED'
