code: def wrap_function(function, args):
      ncalls = [0]
      if function is None:
          return ncalls, None
  
      def function_wrapper(*wrapper_args):
          ncalls[0] += 1
          return function(*(wrapper_args + args))
  
      return ncalls, function_wrapper
  
imports: from __future__ import division, print_function, absolute_import
  import warnings
  import sys
  import numpy
  from scipy._lib.six import callable, xrange
  from numpy import atleast_1d, eye, mgrid, argmin, zeros, shape, squeeze, vectorize, asarray, sqrt, Inf, asfarray, isinf
  import numpy
  from .linesearch import line_search_wolfe1, line_search_wolfe2, line_search_wolfe2, LineSearchWarning
  from scipy._lib._util import getargspec_no_self
label_desc: Use image node_id 8 for calling a global function with example usage: wrap_function(function, args) and returns: ncalls,  function_wrapper, ncalls,  None, function