code: def test_pos(self, doc_en):
      result1 = list(extract.ngrams(doc_en, 2, include_pos={"NOUN"}))
      result2 = list(extract.ngrams(doc_en, 2, include_pos="NOUN"))
      assert all(tok.pos_ == "NOUN" for span in result1 for tok in span)
      assert all(tok.pos_ == "NOUN" for span in result2 for tok in span)
      result3 = list(extract.ngrams(doc_en, 2, exclude_pos={"NOUN"}))
      result4 = list(extract.ngrams(doc_en, 2, exclude_pos="NOUN"))
      assert not any(
          tok.pos_ == "NOUN" for span in result3 for tok in span
      )
      assert not any(
          tok.pos_ == "NOUN" for span in result4 for tok in span
      )
  
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 6 for calling the TestNGrams obj's underlying member method code with example usage: obj.test_pos(doc_en) without return types