code: def additive_proxy(penalty=lambda x: 0.0, args=None, kwds=None):
      """penalize a function with another function: y = f(x) to y' = f(x) + p(x)
  
      This is useful, for example, in penalizing a cost function where the constraints
      are violated; thus, the satisfying the constraints will be preferred at every
      cost function evaluation.
  
      This function does not preserve decorated function signature, but passes args
      and kwds to the penalty function.
      """
      if args is None:
          args = ()
      if kwds is None:
          kwds = {}
  
      def dec(f):
          def func(x, *argz, **kwdz):
              return f(x, *args, **kwds) + penalty(x, *argz, **kwdz)
  
          return func
  
      return dec
  
file_path: mystic/mystic/coupler.py
label_desc: Use image node_id 5 for calling a global function with example usage: additive_proxy(penalty, args, kwds) and returns: dec, func, unknown