code: def test_legder(self):
      # check exceptions
      assert_raises(TypeError, leg.legder, [0], 0.5)
      assert_raises(ValueError, leg.legder, [0], -1)
  
      # check that zeroth derivative does nothing
      for i in range(5):
          tgt = [0] * i + [1]
          res = leg.legder(tgt, m=0)
          assert_equal(trim(res), trim(tgt))
  
      # check that derivation is the inverse of integration
      for i in range(5):
          for j in range(2, 5):
              tgt = [0] * i + [1]
              res = leg.legder(leg.legint(tgt, m=j), m=j)
              assert_almost_equal(trim(res), trim(tgt))
  
      # check derivation with scaling
      for i in range(5):
          for j in range(2, 5):
              tgt = [0] * i + [1]
              res = leg.legder(
                  leg.legint(tgt, m=j, scl=2), m=j, scl=0.5
              )
              assert_almost_equal(trim(res), trim(tgt))
  
imports: from functools import reduce
  import numpy
  import numpy.polynomial.legendre
  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 the TestDerivative obj's underlying member method code with example usage: obj.test_legder() without return types