code: def get_func_info(model_so):
      """Get all the .text sections along with their start and end offset values"""
      hexagon_nm_path = (
          os.environ["HEXAGON_TOOLCHAIN"] + "/bin/hexagon-nm"
      )
      out = subprocess.Popen(
          [hexagon_nm_path, "--print-size", model_so],
          stdout=subprocess.PIPE,
          stderr=subprocess.STDOUT,
      )
      stdo, stde = out.communicate()
      stdo = stdo.decode("utf-8")
  
      func_info = []
      for l in stdo.split("\n"):
          info = {}
          if search(" (T|t) ", l):  # If .text section
              parts = l.split(" ")
              assert len(parts) == 4
              info["start"] = int(parts[0], base=16)
              info["end"] = int(parts[0], base=16) + int(
                  parts[1], base=16
              )
              info["name"] = parts[3]
              func_info.append(info)
  
      # Sort the entries in the increasing order of the start offset value.
      func_info = sorted(func_info, key=lambda d: d["start"])
  
      if ENABLE_DEBUG:
          print("func_info :\n ")
          for f in func_info:
              print(f)
      return func_info
  
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 1 for calling a global function with example usage: get_func_info(model_so) and returns: func_info