code: def test_call(
      nlp: Language,
      text: str,
      expected: List[str],
      orig,
      target,
      lang,
      labels,
  ):
      if lang != target:
          pytest.skip(
              f"target lang is '{target}', but actual lang is {lang}"
          )
      doc: Doc = nlp(text)
      ents = [span.text for span in doc.ents]
      assert ents == expected
      if labels is not None:
          assert [span.label_ for span in doc.ents] == labels
  
file_path: camphr/packages/camphr_pattern_search/tests/test_pattern_search.py
imports: import re
  from typing import List
  import pytest
  import spacy
  from spacy.language import Language
  from spacy.tokens import Doc
  from spacy.tokens.span import Span
  from camphr_pattern_search import PatternSearcher
label_desc: Use image node_id 3 for calling a global function with example usage: test_call(nlp, text, expected, orig, target, lang, labels) without return types