code: def rocm_get_pid_list() -> List[Any]:
      num_items = c_uint32()
      ret = rocmsmi.rsmi_compute_process_info_get(
          None, byref(num_items)
      )
      if rocm_ret_ok(ret):
          buff_sz = num_items.value + 10
          procs = (rsmi_process_info_t * buff_sz)()
          procList = []
          ret = rocmsmi.rsmi_compute_process_info_get(
              byref(procs), byref(num_items)
          )
          for i in range(num_items.value):
              procList.append(procs[i].process_id)
          return procList
      return []
  
file_path: pytorch/tools/stats/monitor.py
imports: import datetime
  import json
  import signal
  import sys
  import time
  from typing import Any, Dict, List
  import psutil
  import pynvml
label_desc: Use image node_id 8 for calling a global function with example usage: rocm_get_pid_list() and returns: list, procList