input: Write a python function to calculate the slope and intercept of a simple linear regression line given two numpy arrays.
  assert linear_regression(np.array([1,2,3,4,5,6,7]), np.array([2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5])) == (1.0, 1.5)
  assert linear_regression(np.array([1,2]), np.array([2, 4])) == (2.0, 0.0)
  assert linear_regression(np.array([5,10,15]), np.array([10,20,30])) == (2.0, 0.0)
output: def linear_regression(x, y):
      n = len(x)
      sum_x = np.sum(x)
      sum_y = np.sum(y)
      sum_x_squared = np.sum(x ** 2)
      sum_xy = np.sum(x * y)
      
      slope = (n * sum_xy - sum_x * sum_y) / (n * sum_x_squared - sum_x ** 2)
      intercept = (sum_y - slope * sum_x) / n
      
      return slope, intercept