code: def get_num_tokens_by_category(self) -> Dict[Hashable, int]:
      cat_to_num_toks = {cat: 0 for cat in self.get_categories()}
  
      for cat, cat_df in self.get_df().groupby(
          self.get_category_column()
      ):
          cat_to_num_toks[cat] = (
              cat_df[self.get_parsed_column()].apply(len).sum()
          )
  
      return cat_to_num_toks
  
imports: import sys
  from typing import Dict, Hashable
  import pandas
  from scattertext.DataFrameCorpus import DataFrameCorpus
  from scattertext.indexstore.IndexStore import IndexStore
label_desc: Use image node_id 3 for calling the ParsedCorpus obj's underlying member method code with example usage: obj.get_num_tokens_by_category() and returns: cat_to_num_toks