input: Write a python function to optimize weights using gradient descent.
  assert optimize([0.5, 0.3, 0.2]) == [optimized_weights_list]
  assert optimize([1.0, 0.8, 0.6]) == [optimized_weights_list]
  assert optimize([0.0, 0.0, 0.0]) == [optimized_weights_list]
output: def optimize(weights, learning_rate=0.01, epochs=1000):
      def compute_gradient(weights):
          # This is a dummy gradient function for demonstration purposes.
          return [-2 * w for w in weights]
  
      for epoch in range(epochs):
          gradients = compute_gradient(weights)
          weights = [w - learning_rate * g for w, g in zip(weights, gradients)]
  
      return weights