def _operator_norms(L):
    """Get operator norms if needed.

    Parameters
    ----------
    L : sequence of `Operator` or float
        The operators or the norms of the operators that are used in the
        `douglas_rachford_pd` method. For `Operator` entries, the norm
        is computed with ``Operator.norm(estimate=True)``.
    """
    L_norms = []
    for Li in L:
        if np.isscalar(Li):
            L_norms.append(float(Li))
        elif isinstance(Li, Operator):
            L_norms.append(Li.norm(estimate=True))
        else:
            raise TypeError('invalid entry {!r} in `L`'.format(Li))
    return L_norms
Get operator norms if needed.

    Parameters
    ----------
    L : sequence of `Operator` or float
        The operators or the norms of the operators that are used in the
        `douglas_rachford_pd` method. For `Operator` entries, the norm
        is computed with ``Operator.norm(estimate=True)``.