code: def test_extract_functionality(doc):
      bigrams = list(
          extract.ngrams(
              doc,
              2,
              filter_stops=True,
              filter_punct=True,
              filter_nums=False,
          )
      )[:10]
      for bigram in bigrams:
          assert isinstance(bigram, Span)
          assert len(bigram) == 2
  
      trigrams = list(
          extract.ngrams(
              doc, 3, filter_stops=True, filter_punct=True, min_freq=2
          )
      )[:10]
      for trigram in trigrams:
          assert isinstance(trigram, Span)
          assert len(trigram) == 3
  
      nes = list(
          extract.entities(
              doc, drop_determiners=False, exclude_types="numeric"
          )
      )[:10]
      for ne in nes:
          assert isinstance(ne, Span)
          assert ne.label_
          assert ne.label_ != "QUANTITY"
  
      regex_matches = list(extract.regex_matches(doc, "Mr\. Speaker"))[
          :10
      ]
      for match in regex_matches:
          assert isinstance(match, Span)
  
      stmts = list(
          extract.semistructured_statements(doc, entity="I", cue="be")
      )[:10]
      for stmt in stmts:
          assert isinstance(stmt, list)
          assert isinstance(stmt[0], str)
          assert len(stmt) == 3
  
      kts = kt.textrank(doc, topn=10)
      for keyterm in kts:
          assert isinstance(keyterm, tuple)
          assert isinstance(keyterm[0], str)
          assert isinstance(keyterm[1], float)
          assert keyterm[1] > 0.0
  
imports: import numpy
  import pytest
  import scipy.sparse
  from spacy.tokens import Doc, Span
  import textacy.datasets
  from textacy import Corpus
  from textacy import extract, preprocessing
  from textacy import load_spacy_lang, make_spacy_doc
  from textacy.extract import keyterms
  from textacy.text_stats import TextStats
  from textacy.tm import TopicModel
  from textacy.representations import Vectorizer
label_desc: Use image node_id 8 for calling a global function with example usage: test_extract_functionality(doc) without return types