input: Write a function to optimize any given code provided in the form of a function and its parameters. The function should iterate through a range of variations for the parameters, determine the best combination that maximizes the output of the given function, and return the best parameters.
  assert optimize(lambda p: p.a + p.b + p.c, Params(1, 2, 3))=={'a': 1, 'b': 2, 'c': 13}
  assert optimize(lambda p: p.a * p.b * p.c, Params(1, 1, 1))=={'a': 1, 'b': 1, 'c': 11}
  assert optimize(lambda p: p.a - p.b - p.c, Params(5, 4, 3))=={'a': 15, 'b': -6, 'c': -6}
  assert optimize(lambda p: abs(p.a - p.b - p.c), Params(7, 3, 1))=={'a': 7, 'b': -3, 'c': -9}
  assert optimize(lambda p: (p.a + p.b) * p.c, Params(2, 3, 4))=={'a': 2, 'b': 13, 'c': 4}
output: def optimize(func, params):
      best_params = {}
      best_value = float('-inf')
      for a in range(params.a, params.a + 10):
          for b in range(params.b, params.b + 10):
              for c in range(params.c, params.c + 10):
                  value = func(Params(a, b, c))
                  if value > best_value:
                      best_value = value
                      best_params = {'a': a, 'b': b, 'c': c}
      return best_params