code: def test_get_doc_freqs(vectorizer_and_dtm, lamb_and_children_idxs):
      _, doc_term_matrix = vectorizer_and_dtm
      idx_lamb, idx_children = lamb_and_children_idxs
      doc_freqs = representations.get_doc_freqs(doc_term_matrix)
      assert len(doc_freqs) == doc_term_matrix.shape[1]
      assert doc_freqs.max() == 5
      assert doc_freqs.min() == 1
      assert doc_freqs[idx_lamb] == 5
      assert doc_freqs[idx_children] == 2
  
imports: import pytest
  import numpy
  from scipy.sparse import coo_matrix
  from textacy import extract, representations
label_desc: Use image node_id 10 for calling a global function with example usage: test_get_doc_freqs(vectorizer_and_dtm, lamb_and_children_idxs) without return types