code: def extract(file_path, fun):
      cuobjdump, _ = path_to_cuobjdump()
      nvdisasm, _ = path_to_nvdisasm()
      os.environ["NVDISASM_PATH"] = nvdisasm
      if fun is None:
          sass_str = subprocess.check_output(
              [cuobjdump, "-sass", file_path]
          )
      else:
          sass_str = subprocess.check_output(
              [cuobjdump, "-fun", fun, "-sass", file_path]
          )
      sass_lines = sass_str.splitlines()
      line_idx = 0
      while line_idx < len(sass_lines):
          line = sass_lines[line_idx].decode()
          # format:
          # function : <function_name>
          # .headerflags: ...
          # /*0000*/ asmstr /*0x...*/
          #                 /*0x...*/
  
          # Looking for new function header (function: <name>)
          while FNAME_RE.match(line) is None:
              line_idx += 1
              if line_idx < len(sass_lines):
                  line = sass_lines[line_idx].decode()
              else:
                  return
  
          fname = FNAME_RE.match(line).group(1)
          ret = ""
          ret += f"Function:{fname}\n"
          line_idx += 2  # bypass .headerflags
          line = sass_lines[line_idx].decode()
          # Remapping address to label
          labels = {}  # address -> label_idx
          # store sass asm in buffer and them print them (for labels)
          # (ctrl, asm)
          asm_buffer = []
          while FLINE_RE.match(line) is not None:
              # First line (Offset ASM Encoding)
              fline = sass_lines[line_idx].decode()
              line_idx += 1
              # Second line (Encoding)
              sline = sass_lines[line_idx].decode()
              line_idx += 1
              asm_buffer.append(processSassLines(fline, sline, labels))
              # peek the next line
              line = sass_lines[line_idx].decode()
          # Print sass
          # label naming convention: LBB#i
          for idx, (ctrl, asm) in enumerate(asm_buffer):
              # Print label if this is BRA target
              offset = idx * 16
              if offset in labels:
                  label_name = f"LBB{labels[offset]}"
                  ret += f"{label_name}:\n"
              ret += ctrl + "\t"
              # if this is BRA, remap offset to label
              if BRA_RE.match(asm):
                  target = int(BRA_RE.match(asm).group(2), 16)
                  target_name = f"LBB{labels[target]}"
                  asm = BRA_RE.sub(rf"\1{target_name};", asm)
              ret += asm + "\n"
          ret += "\n"
          return ret
  
file_path: triton/python/triton/tools/disasm.py
imports: import functools
  import os
  import re
  import subprocess
  import tempfile
  from ..common.backend import path_to_cuobjdump, path_to_nvdisasm
label_desc: Use image node_id 4 for calling a global function with example usage: extract(file_path, fun) and returns: ret