def METHOD_NAME(self,cc):
    eom = kccsd_ghf.EOMEA(cc)
    imds = eom.make_imds()
    nkpts, nocc, nvir = imds.t1.shape
    diag = kccsd_ghf.eaccsd_diag(eom,0,imds=imds)
    I = np.identity(diag.shape[0],dtype=complex)
    indices = np.arange(len(diag))
    H = np.zeros((I.shape[0],len(indices)),dtype=complex)
    for j,idx in enumerate(indices):
        H[:,j] = kccsd_ghf.eaccsd_matvec(eom,I[:,idx],0,imds=imds)
    diag_ref = np.zeros(len(indices),dtype=complex)
    diag_out = np.zeros(len(indices),dtype=complex)
    for j,idx in enumerate(indices):
        diag_ref[j] = H[idx,j]
        diag_out[j] = diag[idx]
    diff = np.linalg.norm(diag_ref - diag_out)
    self.assertTrue(abs(diff) < KGCCSD_TEST_THRESHOLD,"Difference in EA diag: {}".format(diff))