code: def build_combined_hebrew_dataset(paths, model_type, dataset):
      """
      Combines the IAHLT treebank with an updated form of HTB where the annotation style more closes matches IAHLT
  
      Currently the updated HTB is not in UD, so you will need to clone
      git@github.com:IAHLT/UD_Hebrew.git to $UDBASE_GIT
  
      dev and test sets will be those from IAHLT
      """
      udbase_dir = paths["UDBASE"]
      udbase_git_dir = paths["UDBASE_GIT"]
  
      treebanks = ["UD_Hebrew-IAHLTwiki"]
      if dataset == "train":
          sents = []
          for treebank in treebanks:
              conllu_file = common.find_treebank_dataset_file(
                  treebank, udbase_dir, dataset, "conllu", fail=True
              )
              new_sents = read_sentences_from_conllu(conllu_file)
              print(
                  "Read %d sentences from %s"
                  % (len(new_sents), conllu_file)
              )
              sents.extend(new_sents)
  
          # if/when this gets ported back to UD, switch to getting both datasets from UD
          hebrew_git_dir = os.path.join(udbase_git_dir, "UD_Hebrew")
          if not os.path.exists(hebrew_git_dir):
              raise FileNotFoundError(
                  "Please download git@github.com:IAHLT/UD_Hebrew.git to %s (based on $UDBASE_GIT)"
                  % hebrew_git_dir
              )
          conllu_file = os.path.join(
              hebrew_git_dir, "he_htb-ud-train.conllu"
          )
          if not os.path.exists(conllu_file):
              raise FileNotFoundError(
                  "Found %s but inexplicably there was no %s"
                  % (hebrew_git_dir, conllu_file)
              )
          new_sents = read_sentences_from_conllu(conllu_file)
          print(
              "Read %d sentences from %s"
              % (len(new_sents), conllu_file)
          )
          sents.extend(new_sents)
      else:
          conllu_file = common.find_treebank_dataset_file(
              treebanks[0], udbase_dir, dataset, "conllu", fail=True
          )
          sents = read_sentences_from_conllu(conllu_file)
  
      return sents
  
imports: import argparse
  import glob
  import os
  import random
  import re
  import tempfile
  from collections import Counter
  from stanza.models.common.constant import treebank_to_short_name
  import stanza.utils.datasets.common
  from stanza.utils.datasets.common import read_sentences_from_conllu, write_sentences_to_conllu, INT_RE, MWT_RE, MWT_OR_COPY_RE
  import stanza.utils.datasets.tokenization.convert_ml_cochin
  import stanza.utils.datasets.tokenization.convert_my_alt
  import stanza.utils.datasets.tokenization.convert_vi_vlsp
  import stanza.utils.datasets.tokenization.convert_th_best
  import stanza.utils.datasets.tokenization.convert_th_lst20
  import stanza.utils.datasets.tokenization.convert_th_orchid
label_desc: Use image node_id 32 for calling a global function with example usage: build_combined_hebrew_dataset(paths, model_type, dataset) and returns: sents