Write a function matrix power(A, n) that computes the powerAn using Boolean arithmetic and returns the result. Youmay assume that A is a 2D list containing only 0s and 1s, A issquare (same number of rows and columns), and n is an integer ≥ 1.You should call your previously written matrix multiply booleanfunction.
Example: Let R = [ [0, 0, 0, 1], [0, 1, 1, 0], [0, 0, 0, 1], [0,0, 1, 0] ]
Then calling matrix power(R, 2) should return [ [0, 0, 1, 0],[0, 1, 1, 1], [0, 0, 1, 0], [0, 0, 0, 1] ]