code: def test_dedupe(self, dedupe, doc_en):
      results = list(
          extract.terms(
              doc_en, ngs=2, ents=True, ncs=True, dedupe=dedupe
          )
      )
      assert results
      if dedupe is True:
          assert len(results) == len(
              set((result.start, result.end) for result in results)
          )
      else:
          assert len(results) > len(
              set((result.start, result.end) for result in results)
          )
  
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 4 for calling the TestTerms obj's underlying member method code with example usage: obj.test_dedupe(dedupe, doc_en) without return types