code: def _take_process_cpu_snapshot():
      pts = dict()
      sts = dict()
      for p in psutil.process_iter():
          try:
              pts[p.pid] = p.cpu_times()
              sts[p.pid] = _timer()
          except (psutil.NoSuchProcess, psutil.AccessDenied):
              pass
      return pts, sts
  
imports: import logging
  import math
  import os
  import subprocess
  import sys
  import time
  from collections import namedtuple
  from typing import List, Optional
  import psutil
  from .lib import nvutils
  from ._resource import Resource, ZeroResource
  from .utils import get_bool_environ
label_desc: Use image node_id 5 for calling a global function with example usage: _take_process_cpu_snapshot() and returns: pts,  sts