code: def test_get_term_freqs_sublinear(
      vectorizer_and_dtm, lamb_and_children_idxs
  ):
      _, doc_term_matrix = vectorizer_and_dtm
      idx_lamb, idx_children = lamb_and_children_idxs
      tfs = representations.get_term_freqs(
          doc_term_matrix, type_="linear"
      )
      tfs_sqrt = representations.get_term_freqs(
          doc_term_matrix, type_="sqrt"
      )
      tfs_log = representations.get_term_freqs(
          doc_term_matrix, type_="log"
      )
      assert (
          len(tfs)
          == len(tfs_sqrt)
          == len(tfs_log)
          == doc_term_matrix.shape[1]
      )
      assert tfs_log.max() == pytest.approx(2.60943, abs=1e-3)
      assert tfs_log.min() == pytest.approx(1.0, abs=1e-3)
      assert tfs_log[idx_lamb] == pytest.approx(2.60943, abs=1e-3)
      assert tfs_log[idx_children] == pytest.approx(1.69314, abs=1e-3)
      assert (tfs_sqrt == np.sqrt(tfs)).all()
      assert (tfs_log == np.log(tfs) + 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 8 for calling a global function with example usage: test_get_term_freqs_sublinear(vectorizer_and_dtm, lamb_and_children_idxs) without return types