code: def test_comments(foundation_cache):
      """
      Test that the pipeline is creating constituency comments
      """
      pipe = stanza.Pipeline(
          "en",
          model_dir=TEST_MODELS_DIR,
          processors="tokenize,pos,constituency",
          foundation_cache=foundation_cache,
      )
      doc = pipe(TEST_TEXT)
      check_results(doc)
      for sentence in doc.sentences:
          assert any(
              x.startswith("# constituency = ")
              for x in sentence.comments
          )
      doc.sentences[0].constituency = "asdf"
      assert "# constituency = asdf" in doc.sentences[0].comments
      for sentence in doc.sentences:
          assert (
              len(
                  [
                      x
                      for x in sentence.comments
                      if x.startswith("# constituency")
                  ]
              )
              == 1
          )
  
file_path: stanza/stanza/tests/pipeline/test_pipeline_constituency_processor.py
imports: import pytest
  import stanza
  from stanza.models.common.foundation_cache import FoundationCache
  from stanza.tests import *
label_desc: Use image node_id 4 for calling a global function with example usage: test_comments(foundation_cache) without return types