code: def generated_search_prefix_tree(generated, prefix_tree, tokenizer):
      tree = prefix_tree
      # Leaf is KEY_VALUE_SPLIT
      for token in generated:
          if token not in tree:
              return [tokenizer.eos_token]
          tree = tree[token]
  
      return list(tree)
  
file_path: DeepKE/src/deepke/name_entity_re/cross/seq2seq/constraint_decoder/constraint_decoder.py
imports: from collections import defaultdict
  import os
  from typing import List
label_desc: Use image node_id 4 for calling a global function with example usage: generated_search_prefix_tree(generated, prefix_tree, tokenizer) and returns: list, list