input: def add_matrix(matrix1, matrix2):
      if len(matrix1) != len(matrix2):
          return 'Matrices not compatible'
      if len(matrix1[0]) != len(matrix2[0]):
          return 'Matrices not compatible'
      
      rows = len(matrix1)
      cols = len(matrix1[0])
      result = [[sum(row) for row in zip(*size)] for size in zip(matrix1, matrix2)]
      
      return result
  
  """
  This function takes in two matrices as input and checks if they are of the same dimension (same number of rows and columns). If not, it returns a string 'Matrices not compatible'. If they are compatible, it adds the matrices element-wise and returns the resulting matrix.
  Example:
  >>> add_matrix([[1, 2], [3, 4]], [[2, 3], [4, 5]])
  [[3, 5], [7, 9]]
  >>> add_matrix([[1, 2], [3, 4]], [[2, 3, 4], [4, 5, 6]])
  'Matrices not compatible'
  """
output:     result = [[matrix1[i][j] + matrix2[i][j] for j in range(cols)] for i in range(rows)]
      return result