def _descend_cashed(self, curr, s):
if s == "<STR_LIT>":<EOL><INDENT>return curr<EOL><DEDENT>curr_cash = self._descendance_cash[curr]<EOL>answer = curr_cash.get(s, None)<EOL>if answer is not None:<EOL><INDENT>return answer<EOL><DEDENT>res = curr<EOL>for a in s:<EOL><INDENT>res = self.graph[res][self.alphabet_codes[a]]<EOL>if res == Trie.NO_NODE:<EOL><INDENT>break<EOL><DEDENT><DEDENT>curr_cash[s] = res<EOL>return res<EOL>
Спуск из вершины curr по строке s с кэшированием