code: def test_upos_retag(pipeline):
      """
      Test using the English tagger that trees will be correctly retagged by read_trees using upos
      """
      text = "((S (VP (X Find)) (NP (X Mox) (X Opal))))   ((S (NP (X Ragavan)) (VP (X steals) (NP (X important) (X cards)))))"
      expected = "((S (VP (VERB Find)) (NP (PROPN Mox) (PROPN Opal)))) ((S (NP (PROPN Ragavan)) (VP (VERB steals) (NP (ADJ important) (NOUN cards)))))"
  
      trees = tree_reader.read_trees(text)
  
      new_trees = utils.retag_trees(trees, [pipeline], xpos=False)
      assert new_trees == tree_reader.read_trees(expected)
  
file_path: stanza/stanza/tests/constituency/test_utils.py
imports: import pytest
  from stanza import Pipeline
  from stanza.models.constituency import tree_reader
  from stanza.models.constituency import utils
  from stanza.tests import *
label_desc: Use image node_id 3 for calling a global function with example usage: test_upos_retag(pipeline) without return types