code: def test_matcher_extension_in_set_predicate(en_vocab):
      matcher = Matcher(en_vocab)
      Token.set_extension("ext", default=[])
      pattern = [{"_": {"ext": {"IN": ["A", "C"]}}}]
      matcher.add("M", [pattern])
      doc = Doc(en_vocab, words=["a", "b", "c"])
  
      # The IN predicate expects an exact match between the
      # extension value and one of the pattern's values.
      doc[0]._.ext = ["A", "B"]
      assert len(matcher(doc)) == 0
  
      doc[0]._.ext = ["A"]
      assert len(matcher(doc)) == 0
  
      doc[0]._.ext = "A"
      assert len(matcher(doc)) == 1
  
imports: import pytest
  from mock import Mock
  from spacy.matcher import Matcher
  from spacy.tokens import Doc, Span, Token
  from ..doc.test_underscore import clean_underscore
label_desc: Use image node_id 38 for calling a global function with example usage: test_matcher_extension_in_set_predicate(en_vocab) without return types