input: Write a function named `optimize` that takes a function `fn` and an instance of a dataclass `Params` as arguments. The function should use nested loops to iterate over possible values for `a`, `b`, and `c` within a range around the initial values provided in `Params`, and return the parameters that yield the highest score when passed to `fn`. The `Params` dataclass is defined to hold three integers `a`, `b`, and `c`. The function `optimize` should return a dictionary with the optimized values for `a`, `b`, and `c`.
  assert optimize(get_result, Params(a=1, b=2, c=3))=={'a': 1, 'b': 2, 'c': 3}
  assert optimize(get_result, Params(a=10, b=20, c=30))=={'a': 10, 'b': 20, 'c': 30}
  assert optimize(get_result, Params(a=-5, b=-5, c=-5))=={'a': -5, 'b': -5, 'c': -5}
  assert optimize(get_result, Params(a=0, b=0, c=0))=={'a': 0, 'b': 0, 'c': 0}
  assert optimize(get_result, Params(a=2, b=2, c=2))=={'a': 2, 'b': 2, 'c': 2}
output: def optimize(fn, params):
      best_score = fn(params.a, params.b, params.c)
      best_params = {'a': params.a, 'b': params.b, 'c': params.c}
      
      for a in range(params.a - 1, params.a + 2):
          for b in range(params.b - 1, params.b + 2):
              for c in range(params.c - 1, params.c + 2):
                  score = fn(a, b, c)
                  if score > best_score:
                      best_score = score
                      best_params = {'a': a, 'b': b, 'c': c}
      
      return best_params