code: def dakota(cost, lb, ub):
      from mystic.solvers import DifferentialEvolutionSolver2
      from mystic.termination import CandidateRelativeTolerance as CRT
      from mystic.strategy import Best1Exp
      from mystic.monitors import VerboseMonitor, Monitor
      from mystic.tools import getch, random_seed
  
      random_seed(123)
  
      # stepmon = VerboseMonitor(100)
      stepmon = Monitor()
      evalmon = Monitor()
  
      ndim = len(lb)  # [(1 + RVend) - RVstart] + 1
  
      solver = DifferentialEvolutionSolver2(ndim, npop)
      solver.SetRandomInitialPoints(min=lb, max=ub)
      solver.SetStrictRanges(min=lb, max=ub)
      solver.SetEvaluationLimits(maxiter, maxfun)
      solver.SetEvaluationMonitor(evalmon)
      solver.SetGenerationMonitor(stepmon)
  
      tol = convergence_tol
      solver.Solve(
          cost,
          termination=CRT(tol, tol),
          strategy=Best1Exp,
          CrossProbability=crossover,
          ScalingFactor=percent_change,
      )
  
      print(solver.bestSolution)
      diameter = -solver.bestEnergy / scale
      func_evals = solver.evaluations
      return diameter, func_evals
  
label_desc: Use image node_id 3 for calling a global function with example usage: dakota(cost, lb, ub) and returns: diameter,  func_evals