code: def convert_cintil_treebank(
      input_filename, train_size=0.8, dev_size=0.1
  ):
      """
      dev_size is the size for splitting train & dev
      """
      trees = read_xml_file(input_filename)
  
      synthetic_trees = []
      natural_trees = []
      for tree_id, tree_text in trees:
          if tree_text.find(" _") >= 0:
              raise ValueError("Unexpected underscore")
          tree_text = tree_text.replace("_)", ")")
          tree_text = tree_text.replace("(A (", "(A' (")
          # trees don't have ROOT, but we typically use a ROOT label at the top
          tree_text = "(ROOT %s)" % tree_text
          trees = tree_reader.read_trees(tree_text)
          if len(trees) != 1:
              raise ValueError(
                  "Unexpectedly found %d trees in %s"
                  % (len(trees), tree_id)
              )
          tree = trees[0]
          if tree_id.startswith("aTSTS"):
              synthetic_trees.append(tree)
          elif tree_id.find("TSTS") >= 0:
              raise ValueError("Unexpected TSTS")
          else:
              natural_trees.append(tree)
  
      print("Read %d synthetic trees" % len(synthetic_trees))
      print("Read %d natural trees" % len(natural_trees))
      train_trees, dev_trees, test_trees = utils.split_treebank(
          natural_trees, train_size, dev_size
      )
      print(
          "Split %d trees into %d train %d dev %d test"
          % (
              len(natural_trees),
              len(train_trees),
              len(dev_trees),
              len(test_trees),
          )
      )
      train_trees = synthetic_trees + train_trees
      print(
          "Total lengths %d train %d dev %d test"
          % (len(train_trees), len(dev_trees), len(test_trees))
      )
      return train_trees, dev_trees, test_trees
  
imports: import xml.etree.ElementTree
  from stanza.models.constituency import tree_reader
  from stanza.utils.datasets.constituency import utils
label_desc: Use image node_id 2 for calling a global function with example usage: convert_cintil_treebank(input_filename, train_size, dev_size) and returns: train_trees,  dev_trees,  test_trees