nowcreate the object of getsolution(module using the following commandsolutions problem getsolutions(lastlyprint the output using the following commandprint (solutionsyou can observe the output of the above program as follows[{' ' ' ' }{' ' ' ' }{' ' ' ' }{' ' ' ' }{' ' ' ' }magic square magic square is an arrangement of distinct numbersgenerally integersin square gridwhere the numbers in each row and in each column and the numbers in the diagonalall add up to the same number called the "magic constantthe following is stepwise execution of simple python code for generating magic squaresdefine function named magic_squareas shown belowdef magic_square(matrix_ms)isize len(matrix_ms[ ]sum_list [the following code shows the code for vertical of squaresfor col in range(isize)sum_list append(sum(row[colfor row in matrix_ms)the following code shows the code for horizantal of squaressum_list extend([sum (linesfor lines in matrix_ms]the following code shows the code for horizontal of squaresdlresult for in range( ,isize)dlresult +=matrix_ms[ ][isum_list append(dlresultdrresult for in range(isize- ,- ,- )drresult +=matrix_ms[ ][isum_list append(drresult