<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def getoptT(X, W, Y, Z, S, M_E, E, m0, rho):
    ''' Perform line search
    '''
    iter_max = 20
    norm2WZ = np.linalg.norm(W, ord='fro')**2 + np.linalg.norm(Z, ord='fro')**2
    f = np.zeros(iter_max + 1)
    f[0] = F_t(X, Y, S, M_E, E, m0, rho)

    t = -1e-1
    for i in range(iter_max):
        f[i + 1] = F_t(X + t * W, Y + t * Z, S, M_E, E, m0, rho)

        if f[i + 1] - f[0] <= 0.5 * t * norm2WZ:
            return t
        t /= 2
    return t