def fit(funct, data, err=None, **kwargs):
    """Generic function fitter.

    Fit data to a given function.

    TODO
    ----
        * Dictionary support for funct to submit user data..

    Parameters
    ----------
    funct: callable
        Function with the first argmument as data space, e.g., x, t, f, Nr. ..
        Any following arguments are the parameters to be fit.
        Except if a verbose flag if used.
    data: iterable (float)
        Data values
    err: iterable (float) [None]
        Data error values in %/100. Default is 1% if None are given.

    Other Parameters
    ----------------
    *dataSpace*: iterable
        Keyword argument of the data space of len(data).
        The name need to fit the first argument of funct.

    Returns
    -------
    model: array
        Fitted model parameter.
    response: array
        Model response.

    Example
    -------
    >>> import pygimli as pg
    >>>
    >>> func = lambda t, a, b: a*np.exp(b*t)
    >>> t = np.linspace(1, 2, 20)
    >>> data = func(t, 1.1, 2.2)
    >>> model, response = pg.frameworks.fit(func, data, t=t)
    >>> print(pg.core.round(model, 1e-5))
    2 [1.1, 2.2]
    >>> _ = pg.plt.plot(t, data, 'o', label='data')
    >>> _ = pg.plt.plot(t, response, label='response')
    >>> _ = pg.plt.legend()
    """
    mgr = ParameterInversionManager(funct, **kwargs)
    model = mgr.invert(data, err, **kwargs)
    return model, mgr.fw.response