code: def test_get_doc_lengths(tokenized_docs, vectorizer_and_dtm):
      _, doc_term_matrix = vectorizer_and_dtm
      dls = representations.get_doc_lengths(
          doc_term_matrix, type_="linear"
      )
      assert len(dls) == doc_term_matrix.shape[0]
      for dl, td in zip(dls, tokenized_docs):
          assert dl == len(td)
  
imports: import pytest
  import numpy
  from scipy.sparse import coo_matrix
  from textacy import extract, representations
label_desc: Use image node_id 12 for calling a global function with example usage: test_get_doc_lengths(tokenized_docs, vectorizer_and_dtm) without return types