def proximal_convex_conj_l2(space, lam=1, g=None):
    r"""Proximal operator factory of the convex conj of the l2-norm/distance.

    Function for the proximal operator of the convex conjugate of the
    functional F where F is the l2-norm (or distance to g, if given)::

        F(x) =  lam ||x - g||_2

    with x and g elements in ``space``, scaling factor lam, and given data g.

    Parameters
    ----------
    space : `LinearSpace`
        Domain of F(x). Needs to be a Hilbert space.
        That is, have an inner product (`LinearSpace.inner`).
    lam : positive float, optional
        Scaling factor or regularization parameter.
    g : ``space`` element, optional
        An element in ``space``. Default: ``space.zero``.

    Returns
    -------
    prox_factory : function
        Factory for the proximal operator to be initialized

    Notes
    -----
    Most problems are forumlated for the squared norm/distance, in that case
    use the `proximal_convex_conj_l2_squared` instead.

    The :math:`L_2`-norm/distance :math:`F` is given by is given by

    .. math::
        F(x) = \lambda \|x - g\|_2

    The convex conjugate :math:`F^*` of :math:`F` is given by

    .. math::
        F^*(y) = \begin{cases}
        0 & \text{if } \|y-g\|_2 \leq \lambda, \\
        \infty & \text{else.}
        \end{cases}

    For a step size :math:`\sigma`, the proximal operator of
    :math:`\sigma F^*` is given by the projection onto the set of :math:`y`
    satisfying :math:`\|y-g\|_2 \leq \lambda`, i.e., by

    .. math::
        \mathrm{prox}_{\sigma F^*}(y) = \begin{cases}
        \lambda \frac{y - g}{\|y - g\|}
        & \text{if } \|y-g\|_2 > \lambda, \\
        y & \text{if } \|y-g\|_2 \leq \lambda
        \end{cases}

    Note that the expression is independent of :math:`\sigma`.

    See Also
    --------
    proximal_l2 : proximal without convex conjugate
    proximal_convex_conj_l2_squared : proximal for squared norm/distance
    """
    prox_l2 = proximal_l2(space, lam=lam, g=g)
    return proximal_convex_conj(prox_l2)
r"""Proximal operator factory of the convex conj of the l2-norm/distance.

    Function for the proximal operator of the convex conjugate of the
    functional F where F is the l2-norm (or distance to g, if given)::

        F(x) =  lam ||x - g||_2

    with x and g elements in ``space``, scaling factor lam, and given data g.

    Parameters
    ----------
    space : `LinearSpace`
        Domain of F(x). Needs to be a Hilbert space.
        That is, have an inner product (`LinearSpace.inner`).
    lam : positive float, optional
        Scaling factor or regularization parameter.
    g : ``space`` element, optional
        An element in ``space``. Default: ``space.zero``.

    Returns
    -------
    prox_factory : function
        Factory for the proximal operator to be initialized

    Notes
    -----
    Most problems are forumlated for the squared norm/distance, in that case
    use the `proximal_convex_conj_l2_squared` instead.

    The :math:`L_2`-norm/distance :math:`F` is given by is given by

    .. math::
        F(x) = \lambda \|x - g\|_2

    The convex conjugate :math:`F^*` of :math:`F` is given by

    .. math::
        F^*(y) = \begin{cases}
        0 & \text{if } \|y-g\|_2 \leq \lambda, \\
        \infty & \text{else.}
        \end{cases}

    For a step size :math:`\sigma`, the proximal operator of
    :math:`\sigma F^*` is given by the projection onto the set of :math:`y`
    satisfying :math:`\|y-g\|_2 \leq \lambda`, i.e., by

    .. math::
        \mathrm{prox}_{\sigma F^*}(y) = \begin{cases}
        \lambda \frac{y - g}{\|y - g\|}
        & \text{if } \|y-g\|_2 > \lambda, \\
        y & \text{if } \|y-g\|_2 \leq \lambda
        \end{cases}

    Note that the expression is independent of :math:`\sigma`.

    See Also
    --------
    proximal_l2 : proximal without convex conjugate
    proximal_convex_conj_l2_squared : proximal for squared norm/distance