code: def fix(data):
      check_id(data, 32)
      data[32]["contract"] = (
          '\n    assert isinstance(xs, list) and len(xs) > 0 and len(xs) % 2 == 0, "invalid inputs" # $_CONTRACT_$'
          + '\n    assert all(type(x) == int for x in xs), "invalid inputs" # $_CONTRACT_$'
          + "\n    dxs = [xs[i] * i for i in range(1, len(xs))] # $_CONTRACT_$"
          + "\n    def func(x): # $_CONTRACT_$"
          + "\n        return poly(xs, x) # $_CONTRACT_$"
          + "\n    def derivative(x): # $_CONTRACT_$"
          + "\n        return poly(dxs, x) # $_CONTRACT_$"
          + "\n    x, tol = 0, 1e-5 # $_CONTRACT_$"
          + "\n    for _ in range(1000): # $_CONTRACT_$"
          + "\n        fx = func(x) # $_CONTRACT_$"
          + "\n        dfx = derivative(x) # $_CONTRACT_$"
          + "\n        if abs(fx) < tol: break # $_CONTRACT_$"
          + "\n        x = x - fx / dfx # $_CONTRACT_$"
          + '\n    assert abs(poly(xs, x)) < tol, "invalid inputs" # $_CONTRACT_$\n'
      )
      data[32]["plus_input"] = [
          l for l in data[32]["plus_input"] if check_valid(l[0])
      ]
  
      return data
  
imports: import math
label_desc: Use image node_id 4 for calling a global function with example usage: fix(data) and returns: data