code: def test_impose_reweighted_variance():
      x0 = [1, 2, 3, 4, 5]
      w0 = [3, 1, 1, 1, 1]
      v = 1.0
  
      w = impose_reweighted_variance(v, x0, w0)
      assert almostEqual(variance(x0, w), v)
      assert almostEqual(mean(x0, w0), mean(x0, w))
  
imports: from mystic.math.measures import *
  from mystic.math import almostEqual
label_desc: Use image node_id 2 for calling a global function with example usage: test_impose_reweighted_variance() without return types