class_docstr: CategoricalStats contains following basic information:
      - _total_count: total count of values
      - _frequency_count: a dictionary maps categorical value to its frequency count
code: def frequency_count(self, frequency: Dict[str, int]):
      if type(frequency) != dict:
          raise InvalidTypeError(
              "frequency_count", type(frequency), "<dict>"
          )
      for key, value in self._frequency_count.items():
          if type(key) not in [str, int]:
              raise InvalidTypeError(
                  "frequency_count:key", type(key), "<str> or <int>"
              )
          if type(value) != int:
              raise InvalidTypeError(
                  "frequency_count:value", type(value), "<int>"
              )
      self._frequency_count = frequency
      self._total_count = sum(list(self._frequency_count.values()))
  
file_path: contextual-ai/xai/data/explorer/categorical/categorical_stats.py
imports: from typing import Dict
  from xai.data.abstract_stats import AbstractStats
  from xai.data.constants import STATSKEY
  from xai.data.exceptions import InvalidTypeError
label_desc: Use image node_id 3 for calling the CategoricalStats obj's underlying member method code with example usage: obj.frequency_count(frequency) without return types