code: def test_weight(self):
      x = np.linspace(-1, 1, 11)
      tgt = 1.0
      res = leg.legweight(x)
      assert_almost_equal(res, 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 8 for calling the TestMisc obj's underlying member method code with example usage: obj.test_weight() without return types