code: def run_and_parse_first_match(run_lambda, command, regex):
      """Runs command using run_lambda, returns the first regex match if it exists"""
      rc, out, _ = run_lambda(command)
      if rc != 0:
          return None
      match = re.search(regex, out)
      if match is None:
          return None
      return match.group(1)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import locale
  import re
  import subprocess
  import sys
  import os
  from collections import namedtuple
  import logging
label_desc: Use image node_id 3 for calling a global function with example usage: run_and_parse_first_match(run_lambda, command, regex) and returns: match, None, None