def power_iteration_kron(A, C, max_iter=1000, tol=0.001, random_state=0):
 AS_size = C.shape[0]
 rng = check_random_state(random_state)
 B = rng.randn(AS_size, AS_size)
 B /= linalg.norm(B, 'fro')
 ATA = np.dot(A.T, A)
 CCT = np.dot(C, C.T)
 L0 = np.inf
 for _ in range(max_iter):
  Y = np.dot(np.dot(ATA, B), CCT)
  L = linalg.norm(Y, 'fro')
  if (abs((L - L0)) < tol):
   break
  B = (Y / L)
  L0 = L
 return L

def power_iteration_kron ( A , C , max_iter = 1000 , tol = 0.001 , random_state = 0 ) : AS_size = C . shape [ 0 ] rng = check_random_state ( random_state ) B = rng . randn ( AS_size , AS_size ) B /= linalg . norm ( B , 'fro' ) ATA = np . dot ( A . T , A ) CCT = np . dot ( C , C . T ) L0 = np . inf for _ in range ( max_iter ) : Y = np . dot ( np . dot ( ATA , B ) , CCT ) L = linalg . norm ( Y , 'fro' ) if ( abs ( ( L - L0 ) ) < tol ) : break B = ( Y / L ) L0 = L return L
find the largest singular value for the matrix kron .