code: def optimize(expr):
      assert isinstance(expr, h2o.expr.ExprNode)
      all_optimizers = get_optimization(expr._op)
      applicable_optimizers = [
          f for f in all_optimizers if f.is_applicable(expr)
      ]
      # at this point we should select the right optimizer operator, but
      # we just pick the first one
      if applicable_optimizers:
          return applicable_optimizers[0].get_optimizer(expr)
      else:
          return None
  
file_path: h2o-3/h2o-py/h2o/expr_optimizer.py
imports: import h2o.expr
label_desc: Use image node_id 1 for calling a global function with example usage: optimize(expr) and returns: applicable_optimizers, None