def function_wrapper(func, arg, kwarg, x):
    """
    Wrapper function for Python functions.

    To be used with partial:

        `obj = partial(function_wrapper, func, arg, kwarg)`

    This allows then calling obj with only the non-masked parameters:

        `fx = obj(x)`

    which translates to:

        `fx = func(x, *arg, **kwarg)`

    Parameters
    ----------
    func : callable
        Python function to be called `func(x, *arg, **kwarg)`
    arg : iterable
        Arguments passed to `func`
    kwarg : dictionary
        Keyword arguments passed to `func`

    Returns
    -------
    float
        Output value calculated by `func`

    """
    return func(x, *arg, **kwarg)