code: def cost_function(params):
      x = data(params)[1] - datapts
      return numpysum(real((conjugate(x) * x)))
  
file_path: mystic/examples/test_getCost.py
imports: from mystic.termination import *
  from mystic.strategy import *
  from forward_model import *
  from mystic.math import poly1d
  from mystic.models import poly
  from mystic.solvers import DifferentialEvolutionSolver
  from mystic.monitors import VerboseMonitor
  from mystic.tools import getch
  from numpy import array
  from numpy import sum
label_desc: Use image node_id 4 for calling a global function with example usage: cost_function(params) and returns: numpysum