code: def test_chebtrim(self):
      coef = [2, -1, 1, 0]
  
      # Test exceptions
      assert_raises(ValueError, cheb.chebtrim, coef, -1)
  
      # Test results
      assert_equal(cheb.chebtrim(coef), coef[:-1])
      assert_equal(cheb.chebtrim(coef, 1), coef[:-3])
      assert_equal(cheb.chebtrim(coef, 2), [0])
  
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 3 for calling the TestMisc obj's underlying member method code with example usage: obj.test_chebtrim() without return types