code: def test_filter_terms_by_df_min_df(vectorizer_and_dtm):
      vectorizer, doc_term_matrix = vectorizer_and_dtm
      dtm, vocab = representations.filter_terms_by_df(
          doc_term_matrix,
          vectorizer.vocabulary_terms,
          max_df=1.0,
          min_df=2,
          max_n_terms=None,
      )
      assert dtm.shape[0] == doc_term_matrix.shape[0]
      assert dtm.shape[1] < doc_term_matrix.shape[1]
      assert all(
          term in vocab
          for term in ("children", "lamb", "mary", "school", "teacher")
      )
  
imports: import pytest
  import numpy
  from scipy.sparse import coo_matrix
  from textacy import extract, representations
label_desc: Use image node_id 19 for calling a global function with example usage: test_filter_terms_by_df_min_df(vectorizer_and_dtm) without return types