code: def process(self, document):
      sentences = document.sentences
  
      if self._model.uses_xpos():
          words = [
              [(w.text, w.xpos) for w in s.words] for s in sentences
          ]
      else:
          words = [
              [(w.text, w.upos) for w in s.words] for s in sentences
          ]
      if self._tqdm:
          words = tqdm(words)
  
      trees = self._model.parse_tagged_words(words, self._batch_size)
      document.set(CONSTITUENCY, trees, to_sentence=True)
      return document
  
file_path: stanza/stanza/pipeline/constituency_processor.py
imports: from stanza.models.constituency.trainer import Trainer
  from stanza.models.common import doc
  from stanza.utils.get_tqdm import get_tqdm
  from stanza.pipeline._constants import *
  from stanza.pipeline.processor import UDProcessor, register_processor
label_desc: Use image node_id 3 for calling the ConstituencyProcessor obj's underlying member method code with example usage: obj.process(document) and returns: document