code: def test_fix_proj_example():
      """
      Test that a non-projective tree can be rearranged as expected
  
      Note that there are several other classes of non-proj tree we could test as well...
      """
      with tempfile.TemporaryDirectory(dir=TEST_WORKING_DIR) as tempdir:
          test_name = os.path.join(tempdir, "fix.xml")
          with open(test_name, "w", encoding="utf-8") as fout:
              fout.write(NONPROJ_EXAMPLE)
          sentences = convert_arboretum.read_xml_file(test_name)
          assert len(sentences) == 1
  
      tree, words = convert_arboretum.process_tree(sentences[0])
      assert not convert_arboretum.word_sequence_missing_words(tree)
      # the 4 and 5 are moved inside the 3-6 node
      expected_orig = "(s (fcl (advp (adv s9_1) (adv s9_2)) (vp (v-fin s9_3) (v-pcp2 s9_6)) (prop s9_4) (adv s9_5) (pp (prp s9_7) (np (num s9_8) (n s9_9))) (pu s9_10)))"
      expected_proj = "(s (fcl (advp (adv s9_1) (adv s9_2)) (vp (v-fin s9_3) (prop s9_4) (adv s9_5) (v-pcp2 s9_6)) (pp (prp s9_7) (np (num s9_8) (n s9_9))) (pu s9_10)))"
      assert str(tree) == expected_orig
      with tsurgeon.Tsurgeon() as tsurgeon_processor:
          assert (
              str(
                  convert_arboretum.check_words(
                      tree, tsurgeon_processor
                  )
              )
              == expected_proj
          )
  
file_path: stanza/stanza/tests/constituency/test_convert_arboretum.py
imports: import os
  import tempfile
  import pytest
  from stanza.server import tsurgeon
  from stanza.tests import TEST_WORKING_DIR
  from stanza.utils.datasets.constituency import convert_arboretum
label_desc: Use image node_id 3 for calling a global function with example usage: test_fix_proj_example() without return types