def custom(x,w,lambdafunc=None):
    """Custom model (for example, for real data fitting).
    
    Parameters
    ----------
    x : numpy array (N,), dtype=float
        Grid points in which the model will be evaluated. N is the number of grid points.
    w : numpy array (N,), dtype=float
        Weights used to evaluate integrals by the Gaussian quadrature.
    lambdafunc: function or None
        Either supply a function, or leave None if the model of the generated data is not known, in which case 
        x and w are ignored.
    
    Returns
    -------
    peq : numpy array (N,), dtype=float
        Probability density distribution evaluated at grid ponits x.
    """
    if lambdafunc is not None:
        peq=lambdafunc(x)
        peq /= sum(w*peq)
    else:
        peq=None
    return peq