input: Write a function to create an AI-powered Python script that optimizes a given function by searching for the best parameters within a specified range. The function should take another function and its parameters as input, and return the parameters that yield the highest result.
  
  def optimize(fn, params):
   best_score = 0
   best_params = None
   for a in range(params.a - 10, params.a + 10):
    for b in range(params.b - 10, params.b + 10):
     for c in range(params.c - 10, params.c + 10):
      score = fn(Params(a, b , c))
      if score > best_score:
       best_score = score
       best_params = {
        'a': a,
        'b': b,
        'c': c
       }
   return best_params
  
  assert optimize(lambda p: p.a + p.b + p.c, Params(a=1, b=2, c=3)) == {'a': 1, 'b': 2, 'c': 3}
  assert optimize(lambda p: p.a * p.b * p.c, Params(a=0, b=0, c=0)) == {'a': 0, 'b': 0, 'c': 0}
  assert optimize(lambda p: p.a - p.b - p.c, Params(a=10, b=5, c=3)) == {'a': 10, 'b': 5, 'c': 3}
  assert optimize(lambda p: p.a ** 2 + p.b ** 2 + p.c ** 2, Params(a=2, b=2, c=2)) == {'a': 2, 'b': 2, 'c': 2}
output: def optimize(fn, params):
   best_score = 0
   best_params = None
   for a in range(params.a - 10, params.a + 10):
    for b in range(params.b - 10, params.b + 10):
     for c in range(params.c - 10, params.c + 10):
      score = fn(Params(a, b , c))
      if score > best_score:
       best_score = score
       best_params = {
        'a': a,
        'b': b,
        'c': c
       }
   return best_params