code: def convert_it_turin(input_path, output_path):
      pipeline = stanza.Pipeline(
          "it", processors="tokenize, mwt", tokenize_no_ssplit=True
      )
  
      os.makedirs(output_path, exist_ok=True)
  
      evalita_dir = os.path.join(input_path, "evalita")
  
      evalita_test = os.path.join(
          evalita_dir, "evalita11_TESTgold_CONPARSE.penn"
      )
      it_test = os.path.join(output_path, "it_turin_test.mrg")
      test_trees = load_trees(evalita_test, pipeline)
      save_trees(it_test, test_trees)
  
      known_text = set()
      for tree in test_trees:
          words = tuple(tree.leaf_labels())
          assert words not in known_text
          known_text.add(words)
  
      evalita_train = os.path.join(output_path, "it_turin_train.mrg")
      evalita_files = glob.glob(os.path.join(evalita_dir, "*2011*penn"))
      turin_files = glob.glob(os.path.join(input_path, "turin", "*pen"))
      filenames = evalita_files + turin_files
      filtered_trees = []
      for filename in filenames:
          if os.path.split(filename)[1] in FILES_TO_ELIMINATE:
              continue
  
          trees = load_trees(filename, pipeline)
          file_trees = []
  
          for tree in trees:
              words = tuple(tree.leaf_labels())
              if words in known_text:
                  print(
                      "Skipping a duplicate in {}: {}".format(
                          filename, tree
                      )
                  )
                  continue
  
              known_text.add(words)
  
              file_trees.append(tree)
  
          filtered_trees.append((filename, file_trees))
  
      print(
          "{} contains {} usable trees".format(
              evalita_test, len(test_trees)
          )
      )
      print(
          "  Unique constituents in {}: {}".format(
              evalita_test,
              parse_tree.Tree.get_unique_constituent_labels(test_trees),
          )
      )
  
      train_trees = []
      dev_trees = []
      for filename, file_trees in filtered_trees:
          print(
              "{} contains {} usable trees".format(
                  filename, len(file_trees)
              )
          )
          print(
              "  Unique constituents in {}: {}".format(
                  filename,
                  parse_tree.Tree.get_unique_constituent_labels(
                      file_trees
                  ),
              )
          )
          for tree in file_trees:
              if len(train_trees) <= len(dev_trees) * 9:
                  train_trees.append(tree)
              else:
                  dev_trees.append(tree)
  
      it_train = os.path.join(output_path, "it_turin_train.mrg")
      save_trees(it_train, train_trees)
  
      it_dev = os.path.join(output_path, "it_turin_dev.mrg")
      save_trees(it_dev, dev_trees)
  
file_path: stanza/stanza/utils/datasets/constituency/convert_it_turin.py
imports: import glob
  import os
  import re
  import sys
  import stanza
  from stanza.models.constituency import parse_tree
  from stanza.models.constituency import tree_reader
label_desc: Use image node_id 5 for calling a global function with example usage: convert_it_turin(input_path, output_path) without return types