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], CategoricalStats], CategoricalStats]:
      """
      Get stats based on labels
  
      Returns:
          A dictionary maps label to the aggregated stats obj
      """
      _stats = dict()
      _all_stats = self._all_analyzer.get_statistics()
      _all_stats_keys = list(_all_stats.frequency_count.keys())
      for label, analyzer in self._label_analyzer.items():
          class_frequency = analyzer.get_statistics().frequency_count
          _stats[label] = dict()
          for key in _all_stats_keys:
              _stats[label][key] = (
                  class_frequency[key] if key in class_frequency else 0
              )
  
          _stats[label] = CategoricalStats(_stats[label])
      return _stats, _all_stats
  
file_path: contextual-ai/xai/data/explorer/categorical/labelled_categorical_analyzer.py
imports: from typing import Tuple, Dict, Union
  from xai.data.explorer.abstract_labelled_analyzer import AbstractLabelledDataAnalyzer
  from xai.data.explorer.categorical.categorical_analyzer import CategoricalDataAnalyzer
  from xai.data.explorer.categorical.categorical_stats import CategoricalStats
label_desc: Use image node_id 2 for calling the LabelledCategoricalDataAnalyzer obj's underlying member method code with example usage: obj.get_statistics() and returns: _stats,  _all_stats