class_docstr: TextStats contains following basic information:
code: def pattern_stats(self, value: Dict[str, int]):
      if type(value) != dict:
          raise InvalidTypeError("pattern_stats", type(value), "<dict>")
  
      for name, count in value.items():
          if type(name) != str:
              raise InvalidTypeError(
                  "pattern_stats: key", type(name), "<str>"
              )
          if type(count) != tuple:
              raise InvalidTypeError(
                  "pattern_stats: count", type(count), "<tuple>"
              )
          if len(count) != 2:
              raise InvalidSizeError(
                  "pattern_stats: count", len(count), 2
              )
          if type(count[0]) != int:
              raise InvalidTypeError(
                  "pattern_stats: count: term_count",
                  type(count[0]),
                  "<int>",
              )
          if type(count[1]) != int:
              raise InvalidTypeError(
                  "pattern_stats: count: document_count",
                  type(count[1]),
                  "<int>",
              )
  
      self._pattern_stats = value
  
imports: from typing import Dict, Optional, Tuple
  from xai.data.abstract_stats import AbstractStats
  from xai.data.constants import STATSKEY
  from xai.data.exceptions import InvalidTypeError, InvalidSizeError
label_desc: Use image node_id 5 for calling the TextStats obj's underlying member method code with example usage: obj.pattern_stats(value) without return types