code: def fixnet(net):
      def profit(x):
          return sum(xi * pi for xi, pi in zip(x, net))
  
      return profit
  
file_path: mystic/examples2/knapsack.py
imports: import mystic
  import mystic.symbolic
  import mystic.constraints
label_desc: Use image node_id 1 for calling a global function with example usage: fixnet(net) and returns: profit, sum