docstr: Remove an event from the queue.
  
  This must be presented the ID as returned by enter().
  If the event is not in the queue, this raises ValueError.
docstr_tok: ["Remove","an","event","from","the","queue",".","This","must","be","presented","the","ID","as","returned","by","enter","(",")",".","If","the","event","is","not","in","the","queue",",","this","raises","ValueError","."]
code: def cancel(self, event):
      """Remove an event from the queue.
  
      This must be presented the ID as returned by enter().
      If the event is not in the queue, this raises ValueError.
  
      """
      with self._lock:
          self._queue.remove(event)
          heapq.heapify(self._queue)
  
file_path: catboost/contrib/tools/python3/src/Lib/sched.py
imports: import time
  import heapq
  from collections import namedtuple
  from itertools import count
  import threading
  from time import monotonic
label_desc: Use image node_id 4 for calling the scheduler obj's underlying member method code with example usage: obj.cancel(event) without return types