code: def test_matcher_from_api_docs(en_vocab):
      matcher = Matcher(en_vocab)
      pattern = [{"ORTH": "test"}]
      assert len(matcher) == 0
      matcher.add("Rule", [pattern])
      assert len(matcher) == 1
      matcher.remove("Rule")
      assert "Rule" not in matcher
      matcher.add("Rule", [pattern])
      assert "Rule" in matcher
      on_match, patterns = matcher.get("Rule")
      assert len(patterns[0])
  
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 2 for calling a global function with example usage: test_matcher_from_api_docs(en_vocab) without return types