input: Write a python function to implement gradient descent for the given function and gradient, and return the list of x values and corresponding function values after each iteration.
  assert gradient_descent(0, 0.01, 15) == ([0, -0.06, -0.1152, -0.167088, -0.21600336, -0.2621852064, -0.305852094464, -0.34720296869632, -0.3864207909947392, -0.4236745435340594, -0.4591200700580068, -0.4929017898535264, -0.5251536364629844, -0.5560000655752044, -0.5855560626236921, -0.6139282648662704], [6, 5.6416, 5.317294336, 5.02181329717248, 4.750646647078254, 4.499924236702013, 4.266339419340742, 4.047044220055182, 3.83958873178082, 3.641844642236027, 3.451944241743902, 3.268248578606476, 3.089306404208853, 2.913834467772924, 2.7406951207654885, 2.568884143134696])
  assert gradient_descent(1, 0.1, 5) == ([1, -0.6, 0.216, -0.1512, 0.090384, -0.0544224], [12, 4.5376, 3.0149376, 2.665231937536, 2.490029071715635, 2.3882706912134085])
output: def gradient_descent(x0, learning_rate, iterations):
      def f(x):
          return 3 * x ** 2 + 6 * x + 6
  
      def grad_f(x):
          return 6 * x + 6
  
      x_values = [x0]
      f_values = [f(x0)]
  
      x = x0
      for _ in range(iterations):
          x = x - learning_rate * grad_f(x)
          x_values.append(x)
          f_values.append(f(x))
  
      return x_values, f_values