code: def _wrap_target_pred_func(func, func_name):
      """
      Wrapper to call func with target and predicted values
      """
  
      def f(self, *args, **kwargs):
          result = func(
              self._target.values,
              self._predicted.values,
              *args,
              **kwargs,
          )
          return result
  
      f.__doc__ = (
          """
          Call ``%s`` using automatic mapping.
  
          - ``y_true``: ``ModelFrame.target``
          - ``y_pred``: ``ModelFrame.predicted``
          """
          % func_name
      )
      return f
  
file_path: pandas-ml/pandas_ml/core/accessor.py
imports: import importlib
  import pandas.compat
label_desc: Use image node_id 4 for calling a global function with example usage: _wrap_target_pred_func(func, func_name) and returns: f, result