code: def test_alignment_mode(self, alignment_mode, doc_en):
      pattern = r"\w [Tt]he \w"
      matches = list(
          extract.regex_matches(
              doc_en, pattern, alignment_mode=alignment_mode
          )
      )
      if alignment_mode == "strict":
          assert not matches
      elif alignment_mode == "contract":
          assert all(match.text.lower() == "the" for match in matches)
      elif alignment_mode == "expand":
          assert all("the" in match.text.lower() for match in matches)
          assert all(len(match.text) > 3 for match in matches)
  
imports: import re
  import pytest
  from spacy.tokens import Span
  from textacy import extract
  from textacy.extract.matches import _make_pattern_from_string
label_desc: Use image node_id 2 for calling the TestRegexMatches obj's underlying member method code with example usage: obj.test_alignment_mode(alignment_mode, doc_en) without return types