docstr: An ordered list of upcoming events.
  
  Events are named tuples with fields for:
      time, priority, action, arguments, kwargs
docstr_tok: ["An","ordered","list","of","upcoming","events",".","Events","are","named","tuples","with","fields","for",":","time",",","priority",",","action",",","arguments",",","kwargs"]
code: def queue(self):
      """An ordered list of upcoming events.
  
      Events are named tuples with fields for:
          time, priority, action, arguments, kwargs
  
      """
      # Use heapq to sort the queue rather than using 'sorted(self._queue)'.
      # With heapq, two events scheduled at the same time will show in
      # the actual order they would be retrieved.
      with self._lock:
          events = self._queue[:]
      return list(map(heapq.heappop, [events] * len(events)))
  
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 7 for calling the scheduler obj's underlying member method code with example usage: obj.queue() and returns: list