input: Write a function to add two matrices. The function should return the resultant matrix after addition. If the input matrices do not have the same dimensions, the function should return 'Matrices not compatible'. If both matrices are empty, the function should return an empty list.
  assert add_matrix([[1, 2], [3, 4]], [[5, 6], [7, 8]])==[[6, 8], [10, 12]]
  assert add_matrix([[1, 2]], [[3, 4]])==[[4, 6]]
  assert add_matrix([[1, 2, 3], [4, 5, 6]], [[1, 1, 1], [1, 1, 1]])==[[2, 3, 4], [5, 6, 7]]
  assert add_matrix([[]], [[]])==[[]]
  assert add_matrix([], [])==[]
  assert add_matrix([[1, 2]], [[1, 2, 3]])=='Matrices not compatible'
  assert add_matrix([[1, 2, 3]], [])=='Matrices not compatible'
output: def add_matrix(matrix1, matrix2):
      if not matrix1 and not matrix2:
          return []
      if len(matrix1) != len(matrix2) or any(len(row1) != len(row2) for row1, row2 in zip(matrix1, matrix2)):
          return 'Matrices not compatible'
      return [[a + b for a, b in zip(row1, row2)] for row1, row2 in zip(matrix1, matrix2)]