code: def get_thread_stacks(cls) -> Dict[str, List[str]]:
      frames = sys._current_frames()
      stacks = dict()
      for th in threading.enumerate():
          tid = getattr(th, "native_id", th.ident)
          stack_key = f"{tid}:{th.name}"
          stacks[stack_key] = traceback.format_stack(frames[th.ident])
      return stacks
  
file_path: mars/mars/services/cluster/procinfo.py
imports: import asyncio
  import sys
  import threading
  import traceback
  from typing import Dict, List
  from ...None import oscar
  from ...oscar.backends.allocate_strategy import ProcessIndex
label_desc: Use image node_id 4 for calling the ProcessInfoActor obj's underlying member method code with example usage: obj.get_thread_stacks(cls) and returns: stacks