code: def test_get_term_freqs(vectorizer_and_dtm, lamb_and_children_idxs):
      _, doc_term_matrix = vectorizer_and_dtm
      idx_lamb, idx_children = lamb_and_children_idxs
      term_freqs = representations.get_term_freqs(
          doc_term_matrix, type_="linear"
      )
      assert len(term_freqs) == doc_term_matrix.shape[1]
      assert term_freqs.min() == 1
      assert term_freqs.max() == 5
      assert term_freqs[idx_lamb] == 5
      assert term_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 7 for calling a global function with example usage: test_get_term_freqs(vectorizer_and_dtm, lamb_and_children_idxs) without return types