code: def test_pos(self, doc_en):
      result1 = list(extract.words(doc_en, include_pos={"NOUN"}))
      result2 = list(extract.words(doc_en, include_pos="NOUN"))
      assert all(tok.pos_ == "NOUN" for tok in result1)
      assert all(tok.pos_ == "NOUN" for tok in result2)
      result3 = list(extract.words(doc_en, exclude_pos={"NOUN"}))
      result4 = list(extract.words(doc_en, exclude_pos="NOUN"))
      assert not any(tok.pos_ == "NOUN" for tok in result3)
      assert not any(tok.pos_ == "NOUN" for tok in result4)
  
imports: import collections
  import pytest
  from spacy.tokens import Span, Token
  from textacy import extract
  from textacy.extract import basics
label_desc: Use image node_id 3 for calling the TestWords obj's underlying member method code with example usage: obj.test_pos(doc_en) without return types