input: Write a function to calculate the moving average of a given list of time-series data points over a specified window size. The function should return a list of moving averages. If the window size is larger than the number of data points, it should return an empty list.
  
  def moving_average(data_points, window):
      if window > len(data_points):
          return []
      moving_average = []
      for index in range(len(data_points)):
         start = 0 if index-window+1 < 0 else index-window+1
         window_data = data_points[start:index+1]
         if len(window_data) > 0:
             average = sum(window_data)/len(window_data)
             moving_average.append(average)
         
      return moving_average
  
  window = 3
  time_series = [3, 5, 7, 2, 8, 10, 11, 65, 72, 81, 99, 100, 150]
  assert moving_average(time_series, window) == [3.0, 4.0, 5.0, 4.67, 5.67, 6.67, 7.67, 28.33, 46.67, 73.67, 84.33, 93.33, 116.33]
  assert moving_average([], 3) == []
  assert moving_average([3, 5, 7], 4) == []
output: def moving_average(data_points, window):
      if window > len(data_points):
          return []
      moving_averages = []
      for i in range(len(data_points)):
          if i >= window - 1:
              window_data = data_points[i - window + 1:i + 1]
              moving_averages.append(sum(window_data) / window)
      return moving_averages