code: def test_get_term_ranks(self):
      term_doc_mat = get_hamlet_term_doc_matrix()
      ranks = TermCategoryRanker().get_rank_df(term_doc_mat)
      self.assertEqual(len(ranks), term_doc_mat.get_num_terms())
      self.assertGreaterEqual(ranks.min().min(), 0)
  
file_path: scattertext/scattertext/test/test_associationCompator.py
imports: from unittest import TestCase
  from scattertext.termcompaction.AssociationCompactor import AssociationCompactor, AssociationCompactorByRank, TermCategoryRanker
  from scattertext.test.test_TermDocMat import get_hamlet_term_doc_matrix
label_desc: Use image node_id 2 for calling the TestAssociationCompactor obj's underlying member method code with example usage: obj.test_get_term_ranks() without return types