input: Write a function to create an animated plot of y = x^2 using matplotlib.
  assert isinstance(create_animated_plot(range(100)), FuncAnimation)
  assert create_animated_plot(range(10))._interval == 100
  assert hasattr(create_animated_plot(range(50)), 'fig')
output: from matplotlib import pyplot as plt
  from matplotlib.animation import FuncAnimation
  
  def create_animated_plot(x_range):
      fig, ax = plt.subplots()
      xdata, ydata = [], []
      ln, = plt.plot([], [], 'ro')
  
      def init():
          ax.set_xlim(min(x_range), max(x_range))
          ax.set_ylim(min(x**2 for x in x_range), max(x**2 for x in x_range))
          return ln,
  
      def update(frame):
          xdata.append(frame)
          ydata.append(frame**2)
          ln.set_data(xdata, ydata)
          return ln,
  
      ani = FuncAnimation(fig, update, frames=x_range, init_func=init, blit=True, interval=100)
      return ani