code: def objective(x, w):
      s = 0
      for i in range(len(x) - 1):
          for j in range(i, len(x)):
              s += w[i, j] * x[i] * x[j]
      return s
  
imports: from mystic.solvers import diffev2
  from mystic.monitors import VerboseMonitor
  from mystic.constraints import impose_sum, discrete, and_
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: objective(x, w) and returns: s