code: def test_get_doc_lengths_exception(vectorizer_and_dtm):
      _, doc_term_matrix = vectorizer_and_dtm
      with pytest.raises(ValueError):
          _ = representations.get_doc_lengths(
              doc_term_matrix, type_="foo"
          )
  
imports: import pytest
  import numpy
  from scipy.sparse import coo_matrix
  from textacy import extract, representations
label_desc: Use image node_id 14 for calling a global function with example usage: test_get_doc_lengths_exception(vectorizer_and_dtm) without return types