input: Write a function to add two matrices. The function should take two matrices as input and return the resulting matrix after addition. If the matrices are not of the same size, the function should return 'Matrices not compatible'.
  assert add_matrix([[1, 2], [3, 4]], [[5, 6], [7, 8]])==[[6, 8], [10, 12]]
  assert add_matrix([[1, 2, 3], [4, 5, 6]], [[1, 1, 1], [1, 1, 1]])==[[2, 3, 4], [5, 6, 7]]
  assert add_matrix([[1, 2], [3, 4]], [[5]])=='Matrices not compatible'
  assert add_matrix([[1, 2], [3, 4]], [[5, 6, 7], [8, 9, 10]])=='Matrices not compatible'
output: def add_matrix(matrix1, matrix2):
      if len(matrix1) != len(matrix2) or any(len(row1) != len(row2) for row1, row2 in zip(matrix1, matrix2)):
          return 'Matrices not compatible'
      return [[matrix1[i][j] + matrix2[i][j] for j in range(len(matrix1[0]))] for i in range(len(matrix1))]