code: def to_dict(self, formatting: bool = True) -> Dict:
      r = self._asdict()
  
      if formatting:
  
          def _format(d):
              if isinstance(d, (int, float)):
                  return f"{d:,}"
              elif isinstance(d, dict):
                  return {k: _format(v) for k, v in d.items()}
              else:
                  return d
  
          return {k: _format(v) for k, v in r.items()}
  
      return r
  
file_path: vizseq/vizseq/_data/stats.py
imports: from collections import Counter, defaultdict
  from typing import List, NamedTuple, Optional, Tuple, Union, Dict
  import numpy
  from vizseq._data import VizSeqDataSources
label_desc: Use image node_id 1 for calling the VizSeqStatsResult obj's underlying member method code with example usage: obj.to_dict(formatting) and returns: r, unknown, d, unknown, d