code: def build_sentence_tree(sentence):
      tree = defaultdict(set)
  
      for prev_token, next_token in zip(sentence[:-1], sentence[1:]):
          tree[prev_token].add(next_token)
  
      return 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 3 for calling a global function with example usage: build_sentence_tree(sentence) and returns: tree