code: def frequency_count(self, frequency: Dict[str, int]):
      self._total_count = 0
      self._cur_resolution_level = 0
  
      def __check_dict(dict_item):
          if type(dict_item) != dict:
              self._total_count = 0
              raise InvalidTypeError(
                  "frequency_count", type(dict_item), "<dict>"
              )
          height_list = []
          for key, value in dict_item.items():
              if type(key) not in [str, int]:
                  self._total_count = 0
                  raise InvalidTypeError(
                      "frequency_count:key", type(key), "<str> or <int>"
                  )
              if type(value) not in [dict, int]:
                  self._total_count = 0
                  raise InvalidTypeError(
                      "frequency_count:value",
                      type(value),
                      "<int> or <dict>",
                  )
  
              if type(value) == dict:
                  height = __check_dict(value)
                  height_list.append(height)
  
              if type(value) == int:
                  self._total_count += value
                  height_list.append(0)
          return max(height_list) + 1
  
      max_level = __check_dict(frequency)
      if len(self._resolution_list) != max_level:
          raise InconsistentSize(
              "frequency_count depth",
              "resolution_list",
              max_level,
              len(self._resolution_list),
          )
      self._frequency_count = frequency
  
file_path: contextual-ai/xai/data/explorer/datetime/datetime_stats.py
imports: from typing import Dict, List
  from xai.data.abstract_stats import AbstractStats
  from xai.data.constants import STATSKEY
  from xai.data.exceptions import InvalidTypeError, InconsistentSize
label_desc: Use image node_id 3 for calling the DatetimeStats obj's underlying member method code with example usage: obj.frequency_count(frequency) and returns: unknown