code: def test_apply_idf_weighting(vectorizer_and_dtm):
      _, doc_term_matrix = vectorizer_and_dtm
      for type_ in ("standard", "smooth", "bm25"):
          reweighted_matrix = representations.apply_idf_weighting(
              doc_term_matrix, type_=type_
          )
          assert reweighted_matrix.shape == doc_term_matrix.shape
  
imports: import pytest
  import numpy
  from scipy.sparse import coo_matrix
  from textacy import extract, representations
label_desc: Use image node_id 16 for calling a global function with example usage: test_apply_idf_weighting(vectorizer_and_dtm) without return types