input: Write a function to create an AI-powered Python script that optimizes any given code. Use the provided example code and generate an optimized version by searching for the best parameters within a specified range around the initial values. Return the optimized parameters and the corresponding result of the function with those parameters.
  
  assert optimize(get_result, Params(a=1, b=2, c=3))=={'a': 7, 'b': 8, 'c': 9}
  assert optimize(get_result, Params(a=10, b=20, c=30))=={'a': 16, 'b': 26, 'c': 36}
  assert optimize(get_result, Params(a=100, b=200, c=300))=={'a': 106, 'b': 206, 'c': 306}
  assert optimize(get_result, Params(a=5, b=10, c=15))=={'a': 11, 'b': 18, 'c': 21}
  assert optimize(get_result, Params(a=-5, b=-10, c=-15))=={'a': 1, 'b': -4, 'c': -9}
  assert optimize(get_result, Params(a=0, b=0, c=0))=={'a': 6, 'b': 6, 'c': 6}
output: def optimize(func, params):
      best_params = {}
      best_result = float('-inf')
      for a in range(params.a - 5, params.a + 6):
          for b in range(params.b - 5, params.b + 6):
              for c in range(params.c - 5, params.c + 6):
                  result = func(a, b, c)
                  if result > best_result:
                      best_result = result
                      best_params = {'a': a, 'b': b, 'c': c}
      return best_params