code: def to_dict(self) -> dict:
      most_calls = {}
      for name_tuple, count in self._call_counter.most_common(10):
          uid, method_name = name_tuple
          most_calls[f"{uid.decode('utf-8')}.{method_name}"] = count
      slow_calls = {}
      for duration, uid, address, content in sorted(
          self._slow_calls, key=operator.itemgetter(0), reverse=True
      ):
          method_name, _batch, args, kwargs = content
          slow_calls[
              f"[{address}]{uid.decode('utf-8')}.{method_name}(args={args}, kwargs={kwargs})"
          ] = duration
      return {"most_calls": most_calls, "slow_calls": slow_calls}
  
imports: import os
  import asyncio
  import copy
  import json
  import heapq
  import logging
  import operator
  from collections import Counter
  from collections.abc import Mapping
  from .backends.message import SendMessage, TellMessage
  from ..typing import BandType
label_desc: Use image node_id 3 for calling the _CallStats obj's underlying member method code with example usage: obj.to_dict() and returns: dict