code: def test_corpus_extract_token_matches(corpus):
      patterns = [
          {"POS": {"IN": ["ADJ", "DET"]}, "OP": "+"},
          {"ORTH": {"REGEX": "workers?"}},
      ]
      matches = itertools.chain.from_iterable(
          textacy.extract.token_matches(doc, patterns) for doc in corpus
      )
      result = collections.Counter(
          match.lemma_ for match in matches
      ).most_common(10)
      assert all(isinstance(key, str) for key, _ in result)
      assert all(isinstance(val, int) for _, val in result)
  
imports: import collections
  import itertools
  import re
  import pytest
  from spacy.tokens import Span
  import textacy
  import textacy.datasets
  import textacy.extract
  import textacy.preprocessing
label_desc: Use image node_id 13 for calling a global function with example usage: test_corpus_extract_token_matches(corpus) without return types