input: from typing import List
  
  def add_matrix(matrix1: List[List[int]], matrix2: List[List[int]]) -> List[List[int]] or str:
      """
      Adds two matrices and returns the resulting matrix. If the matrices are not compatible for addition,
      it returns an error message.
      >>> add_matrix([[1, 2], [3, 4]], [[2, 3], [4, 5]])
      [[3, 5], [7, 9]]
      >>> add_matrix([[1, 2], [3, 4]], [[2, 3]])
      'Matrices not compatible'
      """
output:     if len(matrix1) != len(matrix2) or any(len(row1) != len(row2) for row1, row2 in zip(matrix1, matrix2)):
          return 'Matrices not compatible'
      
      result = []
      for i in range(len(matrix1)):
          row = []
          for j in range(len(matrix1[0])):
              row.append(matrix1[i][j] + matrix2[i][j])
          result.append(row)
      
      return result