code: def test_rare_words():
      """
      Test getting the unique words from a tree
      """
      text = "((SBARQ (WHNP (WP Who)) (SQ (VP (VBZ sits) (PP (IN in) (NP (DT this) (NN seat))))) (. ?)))  ((SBARQ (NP (DT this) (NN seat)) (. ?)))"
  
      trees = tree_reader.read_trees(text)
  
      words = Tree.get_rare_words(trees, 0.5)
      expected = ["Who", "in", "sits"]
      assert words == expected
  
imports: import pytest
  from stanza.models.constituency.parse_tree import Tree
  from stanza.models.constituency import tree_reader
  from stanza.tests import *
label_desc: Use image node_id 7 for calling a global function with example usage: test_rare_words() without return types