<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def douglas_rachford_pd_stepsize(L, tau=None, sigma=None):
 r"""Default step sizes for `douglas_rachford_pd`. 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)``. tau : positive float, optional Use this value for ``tau`` instead of computing it from the operator norms, see Notes. sigma : tuple of float, optional The ``sigma`` step size parameters for the dual update. Returns ------- tau : float The ``tau`` step size parameter for the primal update. sigma : tuple of float The ``sigma`` step size parameters for the dual update. Notes ----- To guarantee convergence, the parameters :math:`\tau`, :math:`\sigma_i` and :math:`L_i` need to satisfy .. math:: \tau \sum_{i=1}^n \sigma_i \|L_i\|^2 < 4. This function has 4 options, :math:`\tau`/:math:`\sigma` given or not given. - If neither :math:`\tau` nor :math:`\sigma` are given, they are chosen as: .. math:: \tau = \frac{1}{\sum_{i=1}^n \|L_i\|}, \quad \sigma_i = \frac{2}{n \tau \|L_i\|^2} - If only :math:`\sigma` is given, :math:`\tau` is set to: .. math:: \tau = \frac{2}{\sum_{i=1}^n \sigma_i \|L_i\|^2} - If only :math:`\tau` is given, :math:`\sigma` is set to: .. math:: \sigma_i = \frac{2}{n \tau \|L_i\|^2} - If both are given, they are returned as-is without further validation. """

    if tau is None and sigma is None:
        L_norms = _operator_norms(L)

        tau = 1 / sum(L_norms)
        sigma = [2.0 / (len(L_norms) * tau * Li_norm ** 2)
                 for Li_norm in L_norms]

        return tau, tuple(sigma)
    elif tau is None:
        L_norms = _operator_norms(L)

        tau = 2 / sum(si * Li_norm ** 2
                      for si, Li_norm in zip(sigma, L_norms))
        return tau, tuple(sigma)
    elif sigma is None:
        L_norms = _operator_norms(L)

        tau = float(tau)
        sigma = [2.0 / (len(L_norms) * tau * Li_norm ** 2)
                 for Li_norm in L_norms]

        return tau, tuple(sigma)
    else:
        return float(tau), tuple(sigma)