code: def label_trees(label_map, trees):
      new_trees = []
      for tree in trees:
          if tree.con_id not in label_map:
              raise ValueError("%s not labeled" % tree.con_id)
          label = label_map[tree.con_id]
          new_trees.append(
              SentimentDatum(label, tree.tree.leaf_labels(), tree.tree)
          )
      return new_trees
  
imports: import os
  from stanza.models.classifiers.data import SentimentDatum
  from stanza.utils.datasets.sentiment import process_utils
  from stanza.utils.datasets.constituency.convert_it_vit import read_updated_trees
  import stanza.utils.default_paths
label_desc: Use image node_id 1 for calling a global function with example usage: label_trees(label_map, trees) and returns: new_trees