<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pdhg_stepsize(L, tau=None, sigma=None):
 r"""Default step sizes for `pdhg`. Parameters L : `Operator` or float Operator or norm of the operator that are used in the `pdhg` method. If it is an `Operator`, 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 : positive 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 parameter for the dual update. Notes ----- To guarantee convergence, the parameters :math:`\tau`, :math:`\sigma` and :math:`L` need to satisfy .. math:: \tau \sigma \|L\|^2 < 1 This function has 4 options, :math:`\tau`/:math:`\sigma` given or not given. - Neither :math:`\tau` nor :math:`\sigma` are given, they are chosen as .. math:: \tau = \sigma = \frac{\sqrt{0.9}}{\|L\|} - If only :math:`\sigma` is given, :math:`\tau` is set to .. math:: \tau = \frac{0.9}{\sigma \|L\|^2} - If only :math:`\tau` is given, :math:`\sigma` is set to .. math:: \sigma = \frac{0.9}{\tau \|L\|^2} - If both are given, they are returned as-is without further validation. """

    if tau is not None and sigma is not None:
        return float(tau), float(sigma)

    L_norm = L.norm(estimate=True) if isinstance(L, Operator) else float(L)
    if tau is None and sigma is None:
        tau = sigma = np.sqrt(0.9) / L_norm
        return tau, sigma
    elif tau is None:
        tau = 0.9 / (sigma * L_norm ** 2)
        return tau, float(sigma)
    else:  # sigma is None
        sigma = 0.9 / (tau * L_norm ** 2)
        return float(tau), sigma