input: Write a function to add two matrices. The function should return the sum of the two matrices if they have the same dimensions. If the matrices do not have the same dimensions, the function should return a message indicating that the matrices are not compatible. If one or both of the matrices are empty, the function should return an empty matrix.
  assert add_matrix([[1, 2], [3, 4]], [[5, 6], [7, 8]])==[[6, 8], [10, 12]]
  assert add_matrix([[1, 0], [0, 1]], [[1, 0], [0, 1]])==[[2, 0], [0, 2]]
  assert add_matrix([[1, 2, 3]], [[4, 5, 6]])==[[5, 7, 9]]
  assert add_matrix([[1, 2], [3, 4]], [[1, 2, 3], [4, 5, 6]])=='Matrices not compatible'
  assert add_matrix([], [])==[]
output: def add_matrix(mat1, mat2):
      if not mat1 or not mat2:
          return []
      if len(mat1) != len(mat2) or len(mat1[0]) != len(mat2[0]):
          return 'Matrices not compatible'
      result = []
      for i in range(len(mat1)):
          row = []
          for j in range(len(mat1[0])):
              row.append(mat1[i][j] + mat2[i][j])
          result.append(row)
      return result