<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _it_sol(s_data, g_hat, d_hat, g_bar, t2, a, b, conv=0.0001) -> Tuple[float, float]: """ Iteratively compute the conditional posterior means for gamma and delta. gamma is an estimator for the additive batch effect, deltat is an estimator for the multiplicative batch effect. We use an EB framework to estimate these two. Analytical expressions exist for both parameters, which however depend on each other. We therefore iteratively evalutate these two expressions until convergence is reached. Parameters -------- s_data : pd.DataFrame Contains the standardized Data g_hat : float Initial guess for gamma d_hat : float Initial guess for delta g_bar, t_2, a, b : float Hyperparameters conv: float, optional (default: `0.0001`) convergence criterium Returns: -------- gamma : float estimated value for gamma delta : float estimated value for delta """


    n = (1 - np.isnan(s_data)).sum(axis=1)
    g_old = g_hat.copy()
    d_old = d_hat.copy()

    change = 1
    count = 0

    # we place a normally distributed prior on gamma and and inverse gamma prior on delta
    # in the loop, gamma and delta are updated together. they depend on each other. we iterate until convergence.
    while change > conv:
        g_new = (t2*n*g_hat + d_old*g_bar) / (t2*n + d_old)
        sum2 = s_data - g_new.reshape((g_new.shape[0], 1)) @ np.ones((1, s_data.shape[1]))
        sum2 = sum2 ** 2
        sum2 = sum2.sum(axis=1)
        d_new = (0.5*sum2 + b) / (n/2.0 + a-1.0)

        change = max((abs(g_new - g_old) / g_old).max(), (abs(d_new - d_old) / d_old).max())
        g_old = g_new  # .copy()
        d_old = d_new  # .copy()
        count = count + 1

    return g_new, d_new