code: def interval(
      datagen, wmin, wmax, alpha=0.05, rmin=0, rmax=1, raiseonerr=False
  ):
      from math import inf, isclose, sqrt
      from scipy.stats import f
  
      assert wmin < 1
      assert wmax > 1
      assert rmin <= rmax
  
      n, sumw, sumwsq, sumwr, sumwsqr, sumwsqrsq = 0, 0, 0, 0, 0, 0
  
      for c, w, r in datagen():
          n += c
          sumw += c * w
          sumwsq += c * w**2
          sumwr += c * w * r
          sumwsqr += c * w**2 * r
          sumwsqrsq += c * w**2 * r**2
      assert n > 0
  
      return CrMinusTwo.intervalimpl(
          n,
          sumw,
          sumwsq,
          sumwr,
          sumwsqr,
          sumwsqrsq,
          wmin,
          wmax,
          alpha,
          rmin,
          rmax,
          raiseonerr,
      )
  
label_desc: Use image node_id 4 for calling the CrMinusTwo obj's underlying member method code with example usage: obj.interval(datagen, wmin, wmax, alpha, rmin, rmax, raiseonerr) and returns: CrMinusTwo