code: def _select_reduce_op(matches, op):
      reduced_val = None
      reduced_m = None
      for m in matches:
          try:
              m_val_str = m.group(1)
          except IndexError:
              pass
          else:
              try:
                  m_val = float(m_val_str)
              except ValueError:
                  pass
              else:
                  if reduced_val is None or op(m_val, reduced_val):
                      reduced_val = m_val
                      reduced_m = m
      if reduced_m:
          assert reduced_val is not None
          return [reduced_m]
      return []
  
imports: import collections
  import copy
  import logging
  import operator
  import pprint
  from guild import util
label_desc: Use image node_id 8 for calling a global function with example usage: _select_reduce_op(matches, op) and returns: list, list