code: def run_once(x0, x1):
      sol = fmin_cg(CostFunction, [x0, x1], retall=True, full_output=1)
      xy = numpy.asarray(sol[-1])
      sam.putarray("xy", xy)
      sam.eval("plot(xy(:,1),xy(:,2),'w-','LineWidth',2)")
      sam.eval("plot(xy(:,1),xy(:,2),'wo','MarkerSize',6)")
      return sol
  
imports: import sam
  from test_zimmermann import *
  from scipy.optimize import fmin_cg
  import numpy
  from mystic.tools import getch
label_desc: Use image node_id 2 for calling a global function with example usage: run_once(x0, x1) and returns: sol