class_docstr: Provides functionality to topologically sort a graph of hashable nodes
docstr: Return a tuple of all the nodes that are ready.
  
  Initially it returns all nodes with no predecessors; once those are marked
  as processed by calling "done", further calls will return all new nodes that
  have all their predecessors already processed. Once no more progress can be made,
  empty tuples are returned.
  
  Raises ValueError if called without calling "prepare" previously.
docstr_tok: ["Return","a","tuple","of","all","the","nodes","that","are","ready",".","Initially","it","returns","all","nodes","with","no","predecessors",";","once","those","are","marked","as","processed","by","calling","``","done","''",",","further","calls","will","return","all","new","nodes","that","have","all","their","predecessors","already","processed",".","Once","no","more","progress","can","be","made",",","empty","tuples","are","returned",".","Raises","ValueError","if","called","without","calling","``","prepare","''","previously","."]
code: def get_ready(self):
      """Return a tuple of all the nodes that are ready.
  
      Initially it returns all nodes with no predecessors; once those are marked
      as processed by calling "done", further calls will return all new nodes that
      have all their predecessors already processed. Once no more progress can be made,
      empty tuples are returned.
  
      Raises ValueError if called without calling "prepare" previously.
      """
      if self._ready_nodes is None:
          raise ValueError("prepare() must be called first")
  
      # Get the nodes that are ready and mark them
      result = tuple(self._ready_nodes)
      n2i = self._node2info
      for node in result:
          n2i[node].npredecessors = _NODE_OUT
  
      # Clean the list of nodes that are ready and update
      # the counter of nodes that we have returned.
      self._ready_nodes.clear()
      self._npassedout += len(result)
  
      return result
  
file_path: catboost/contrib/tools/python3/src/Lib/graphlib.py
imports: from types import GenericAlias
label_desc: Use image node_id 5 for calling the TopologicalSorter obj's underlying member method code with example usage: obj.get_ready() and returns: result