code: def test_limited_pipeline():
      """
      Test loading a pipeline, but then only using a couple processors
      """
      pipe = stanza.Pipeline(
          processors="tokenize,pos,lemma,depparse,ner",
          dir=TEST_MODELS_DIR,
      )
      doc = pipe("John Bauer works at Stanford")
      assert all(
          word.upos is not None
          for sentence in doc.sentences
          for word in sentence.words
      )
      assert all(
          token.ner is not None
          for sentence in doc.sentences
          for token in sentence.tokens
      )
  
      doc = pipe(
          "John Bauer works at Stanford", processors=["tokenize", "pos"]
      )
      assert all(
          word.upos is not None
          for sentence in doc.sentences
          for word in sentence.words
      )
      assert not any(
          token.ner is not None
          for sentence in doc.sentences
          for token in sentence.tokens
      )
  
      doc = pipe("John Bauer works at Stanford", processors="tokenize")
      assert not any(
          word.upos is not None
          for sentence in doc.sentences
          for word in sentence.words
      )
      assert not any(
          token.ner is not None
          for sentence in doc.sentences
          for token in sentence.tokens
      )
  
      doc = pipe(
          "John Bauer works at Stanford", processors="tokenize,ner"
      )
      assert not any(
          word.upos is not None
          for sentence in doc.sentences
          for word in sentence.words
      )
      assert all(
          token.ner is not None
          for sentence in doc.sentences
          for token in sentence.tokens
      )
  
      with pytest.raises(ValueError):
          # this should fail
          doc = pipe(
              "John Bauer works at Stanford",
              processors="tokenize,depparse",
          )
  
imports: import pytest
  import shutil
  import tempfile
  import stanza
  from stanza.tests import *
  from stanza.pipeline import core
  from stanza.resources.common import get_md5, load_resources_json
label_desc: Use image node_id 11 for calling a global function with example usage: test_limited_pipeline() without return types