code: def process_lwp_output(
      binary_path: str,
      serial_number: str,
      lwp_json: str,
      run_log: str,
      lwp_out: str,
      enable_debug: bool = False,
  ):
      """Process lightweight profiling data"""
      # Enable debug messages
      global ENABLE_DEBUG
      ENABLE_DEBUG = enable_debug
  
      # Get load address for the binary
      load_addr = get_load_addr(serial_number, lwp_json, run_log)
      # Opening JSON file
      with open(lwp_json, "r") as f:
          # Returns JSON object as a dictionary
          data = json.load(f)
  
      # Get function names, and their start and end offsets from the model .so
      func_info = get_func_info(binary_path)
  
      # Get the load address for model .so.
      so_ld_addr = load_addr
  
      # Process profiling data to construct a CSV report.
      overall_cycles = process_data(data, func_info, so_ld_addr)
      create_csv_report(overall_cycles, lwp_out)
      print("lwp processed output written to -- ", lwp_out)
      print("[NOTE: Use '--hexagon-debug' to keep the temp directory]")
  
file_path: tvm/python/tvm/contrib/hexagon/profiling/process_lwp_data.py
imports: import json
  import csv
  import subprocess
  import argparse
  import os
  from re import search, compile
  from collections import OrderedDict
label_desc: Use image node_id 8 for calling a global function with example usage: process_lwp_output(binary_path, serial_number, lwp_json, run_log, lwp_out, enable_debug) without return types