code: def hartmann(x, alpha, A, P, max_val=np.inf):
      """Computes the hartmann function for any given A and P."""
      log_sum_terms = (A * (P - x) ** 2).sum(axis=1)
      return min(max_val, alpha.dot(np.exp(-log_sum_terms)))
  
imports: from __future__ import division
  import numpy
  from .general_utils import map_to_cube
  from ..exd.experiment_caller import EuclideanFunctionCaller
label_desc: Use image node_id 1 for calling a global function with example usage: hartmann(x, alpha, A, P, max_val) and returns: min