code: def evaluate(values: np.ndarray, nvars: int = 100, seed=101):
      """Evaluate the Lake Problem with an array of parameter values.
  
      Parameters
      ----------
      values : np.ndarray,
               model inputs in the (column) order of
               a, q, b, mean, stdev, delta, alpha
  
      nvars : int,
              number of decision variables to simulate (default: 100)
  
  
      Returns
      -------
      np.ndarray : max_P, utility, inertia, reliability
      """
      a, q, b, _, __, delta, alpha = values.T
  
      nsamples = len(a)
      Y = np.empty((nsamples, 4))
      for i in range(nsamples):
          tmp = evaluate_lake(values[i, :5], seed=seed)
  
          a_i = a[i]
          q_i = q[i]
  
          Pcrit = brentq(
              lambda x: x**q_i / (1.0 + x**q_i) - b[i] * x,
              0.01,
              1.5,
          )
  
          reliability = len(tmp[tmp < Pcrit]) / nvars
  
          max_P = np.max(tmp)
          utility = np.sum(
              alpha[i] * a_i * np.power(delta[i], np.arange(nvars))
          )
  
          # In practice, `a` will be set by a separate decision model
          # See [2] in docstring for `lake_problem()`
          # Here, it is a constant for a given scenario.
          # The value for `tau` (0.02) is taken from [2].
          inertia = len(a_i[a_i < 0.02]) / nvars
  
          Y[i, :] = max_P, utility, inertia, reliability
  
      return Y
  
imports: from typing import Union
  import numpy
  from numpy import log, sqrt
  from scipy.optimize import brentq
label_desc: Use image node_id 3 for calling a global function with example usage: evaluate(values, nvars, seed) and returns: Y