code: def prepare_fun(mgr, constraints, default, call_log):
      """Creates the objective function and wraps it with domain constraints
      and an existing call log, if applicable."""
      func = optunity.wrap_constraints(
          comm.make_piped_function(mgr), default, **constraints
      )
      if call_log:
          func = optunity.wrap_call_log(func, call_log)
      else:
          func = functions.logged(func)
      return func
  
file_path: optunity/optunity/standalone.py
imports: from __future__ import print_function
  import sys
  import keyword
  from .None import communication
  from .None import functions
  import optunity
label_desc: Use image node_id 5 for calling a global function with example usage: prepare_fun(mgr, constraints, default, call_log) and returns: func