docstr: Get stats based on labels
  
  Returns:
      A dictionary maps label to the aggregated stats obj
docstr_tok: ["Get","stats","based","on","labels","Returns",":","A","dictionary","maps","label","to","the","aggregated","stats","obj"]
code: def get_statistics(
      self,
  ) -> Tuple[Dict[Union[str, int], TextStats], TextStats]:
      """
      Get stats based on labels
  
      Returns:
          A dictionary maps label to the aggregated stats obj
      """
      _stats = dict()
      _all_stats = self._all_analyzer.get_statistics()
  
      df = dict(_all_stats.document_frequency)
      total_doc_count = _all_stats.total_count
      for label, analyzer in self._label_analyzer.items():
          _stats[label] = analyzer.get_statistics(
              global_doc_frequency=df, total_doc_count=total_doc_count
          )
  
      return _stats, _all_stats
  
file_path: contextual-ai/xai/data/explorer/text/labelled_text_analyzer.py
imports: from copy import deepcopy
  from nltk.tokenize import word_tokenize
  from typing import Callable, Optional, Dict, List, Set
  from typing import Tuple, Union
  from xai.data.constants import TermFrequencyType
  from xai.data.explorer.abstract_labelled_analyzer import AbstractLabelledDataAnalyzer
  from xai.data.explorer.text.text_analyzer import TextDataAnalyzer
  from xai.data.explorer.text.text_stats import TextStats
label_desc: Use image node_id 3 for calling the LabelledTextDataAnalyzer obj's underlying member method code with example usage: obj.get_statistics() and returns: _stats,  _all_stats