code: def test_trimcoef(self):
      coef = [2, -1, 1, 0]
      # Test exceptions
      assert_raises(ValueError, pu.trimcoef, coef, -1)
      # Test results
      assert_equal(pu.trimcoef(coef), coef[:-1])
      assert_equal(pu.trimcoef(coef, 1), coef[:-3])
      assert_equal(pu.trimcoef(coef, 2), [0])
  
file_path: catboost/contrib/python/numpy/py3/numpy/polynomial/tests/test_polyutils.py
imports: import numpy
  import numpy.polynomial.polyutils
  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_trimcoef() without return types