docstr: Обратная топологическая сортировка
docstr_tok: ["\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f","\u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f","\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430"]
code: def generate_postorder(self, trie):
      """
      Обратная топологическая сортировка
      """
      order, stack = [], []
      stack.append(trie.root)
      colors = ["white"] * len(trie)
      while len(stack) > 0:
          index = stack[-1]
          color = colors[index]
          if color == "white":  # вершина ещё не обрабатывалась
              colors[index] = "grey"
              for child in trie._get_children(index):
                  # проверяем, посещали ли мы ребёнка раньше
                  if child != Trie.NO_NODE and colors[child] == "white":
                      stack.append(child)
          else:
              if color == "grey":
                  colors[index] = "black"
                  order.append(index)
              stack = stack[:-1]
      return order
  
imports: import copy
  from collections import defaultdict
  import numpy
label_desc: Use image node_id 3 for calling the TrieMinimizer obj's underlying member method code with example usage: obj.generate_postorder(trie) and returns: order