code: def trim(x):
      return cheb.chebtrim(x, tol=1e-6)
  
imports: from functools import reduce
  import numpy
  import numpy.polynomial.chebyshev
  from numpy.polynomial.polynomial import polyval
  from numpy.testing import assert_almost_equal, assert_raises, assert_equal, assert_
label_desc: Use image node_id 1 for calling a global function with example usage: trim(x) and returns: cheb