code: def test_exclude_types(self, doc_en):
      ent_types = ["PERSON", "GPE"]
      for exclude_types in ent_types:
          result = extract.entities(doc_en, exclude_types=exclude_types)
          assert all(span.label_ != exclude_types for span in result)
      ent_types = [{"PERSON", "GPE"}, ("DATE", "ORG"), ["LOC"]]
      for exclude_types in ent_types:
          result = extract.entities(doc_en, exclude_types=exclude_types)
          assert all(
              span.label_ not in exclude_types for span in result
          )
      # special numeric cases!
      ent_types = ["NUMERIC", ("NUMERIC",), {"PERSON", "NUMERIC"}]
      for exclude_types in ent_types:
          exclude_types_parsed = basics._parse_ent_types(
              exclude_types, "exclude"
          )
          result = extract.entities(doc_en, exclude_types=exclude_types)
          assert all(
              span.label_ not in exclude_types_parsed for span in result
          )
  
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 TestEntities obj's underlying member method code with example usage: obj.test_exclude_types(doc_en) without return types