code: def parse_lsof_output(lsof_output, verbose):
      """Parse the lsof output."""
      data = defaultdict(list)
      lines = lsof_output.splitlines()
  
      for line in lines[1:]:  # Skip header line
          parts = line.split(maxsplit=8)
          if len(parts) < 9 or "python" not in parts[0].lower():
              continue  # Skip lines that are not Python processes
  
          (
              proc_name,
              pid,
              owner,
              fd_type,
              fd_info,
              _,
              _,
              _,
              file_path,
          ) = parts
          # Skip site-packages paths if not in verbose mode
          filters = [
              "site-packages",
              "lib-dynload",
              "cellar",
              ".pyenv",
              "ttys",
              "/dev/null",
              "/dev/random",
              "/dev/urandom",
              "localhost",
          ]
          skip = False
          if not verbose:
              for filter in filters:
                  if filter in file_path.lower():
                      skip = True
                      break
          if skip:
              continue
  
          data[pid].append(
              {
                  "Owner": owner,
                  "FD Type": fd_type,
                  "FD Info": fd_info,
                  "File Path": file_path,
              }
          )
  
      return data
  
imports: import argparse
  from collections import defaultdict
  import subprocess
label_desc: Use image node_id 3 for calling a global function with example usage: parse_lsof_output(lsof_output, verbose) and returns: data