@staticmethod
def _wrap_function(original_func, wrapper_infodict):
    """Return a wrapped version of func.

        :param original_func: The function to be wrapped.
        :param wrapper_infodict: The infodict to use for constructing the
            wrapper.
        """
    src = ('lambda %(signature)s: _original_func_(%(signature)s)' %
        wrapper_infodict)
    wrapped_func = eval(src, dict(_original_func_=original_func))
    wrapped_func.__name__ = wrapper_infodict['name']
    wrapped_func.__doc__ = wrapper_infodict['doc']
    wrapped_func.__module__ = wrapper_infodict['module']
    wrapped_func.__dict__.update(wrapper_infodict['dict'])
    wrapped_func.__defaults__ = wrapper_infodict['defaults']
    return wrapped_func
