code: def test_get_doc_lengths_type(vectorizer_and_dtm):
      _, doc_term_matrix = vectorizer_and_dtm
      dls = representations.get_doc_lengths(
          doc_term_matrix, type_="linear"
      )
      dls_sqrt = representations.get_doc_lengths(
          doc_term_matrix, type_="sqrt"
      )
      dls_log = representations.get_doc_lengths(
          doc_term_matrix, type_="log"
      )
      assert (
          len(dls)
          == len(dls_sqrt)
          == len(dls_log)
          == doc_term_matrix.shape[0]
      )
      assert (dls_sqrt == np.sqrt(dls)).all()
      assert (dls_log == np.log(dls) + 1.0).all()
  
imports: import pytest
  import numpy
  from scipy.sparse import coo_matrix
  from textacy import extract, representations
label_desc: Use image node_id 13 for calling a global function with example usage: test_get_doc_lengths_type(vectorizer_and_dtm) without return types