code: def check_valid(xs):
      if not (
          isinstance(xs, list) and len(xs) > 0 and len(xs) % 2 == 0
      ):
          return False
      if not all(type(x) == int for x in xs):
          return False
      dxs = [xs[i] * i for i in range(1, len(xs))]
  
      def func(x):
          return poly(xs, x)
  
      def derivative(x):
          return poly(dxs, x)
  
      x, tol = 0, 1e-5
      for _ in range(1000):
          fx = func(x)
          dfx = derivative(x)
          if abs(fx) < tol:
              break
          x = x - fx / dfx
      if abs(poly(xs, x)) >= tol:
          return False
      return True
  
imports: import math
label_desc: Use image node_id 3 for calling a global function with example usage: check_valid(xs) and returns: True, False, False, poly, poly, False