code: def run_and_parse_first_match(command, regex):
      """Returns the first regex match if it exists"""
      rc, out, _ = run(command)
      if rc != 0:
          return "N/A"
      match = re.search(regex, out)
      if match is None:
          return "N/A"
      return match.group(1)
  
imports: import locale
  import os
  import re
  import subprocess
  import sys
label_desc: Use image node_id 4 for calling a global function with example usage: run_and_parse_first_match(command, regex) and returns: match, str, str