code: def extract_updated_dataset(
      con_tree_map,
      dep_sentence_map,
      split_ids,
      mwt_map,
      tsurgeon_processor,
  ):
      """
      Update constituency trees using the information in the dependency treebank
      """
      trees = []
      for con_id, dep_id in tqdm(split_ids.items()):
          # skip a few trees which have non-MWT word modifications
          if con_id in IGNORE_IDS:
              continue
          original_tree = con_tree_map[con_id]
          dep_sentence = dep_sentence_map[dep_id]
          updated_tree = update_tree(
              original_tree,
              dep_sentence,
              con_id,
              dep_id,
              mwt_map,
              tsurgeon_processor,
          )
  
          trees.append(ProcessedTree(con_id, dep_id, updated_tree))
      return trees
  
imports: from collections import defaultdict, deque, namedtuple
  import itertools
  import os
  import re
  import sys
  from tqdm import tqdm
  from stanza.models.constituency.tree_reader import read_trees, UnclosedTreeError, ExtraCloseTreeError
  from stanza.server import tsurgeon
  from stanza.utils.conll import CoNLL
  from stanza.utils.datasets.constituency.utils import SHARDS, write_dataset
  import stanza.utils.default_paths
label_desc: Use image node_id 11 for calling a global function with example usage: extract_updated_dataset(con_tree_map, dep_sentence_map, split_ids, mwt_map, tsurgeon_processor) and returns: trees