code: def test_initialize_from_array(self, values, weights):
      if weights is None:
          accumulator = variance_util.MeanVarAccumulator()
          accumulator.update(values)
      else:
          accumulator = variance_util.WeightedMeanVarAccumulator()
          accumulator.update(values, weights)
      expected_mean = _weighted_mean(values, weights)
      expected_variance = _weighted_variance(values, weights)
      self.assertAlmostEqual(expected_mean, accumulator.mean)
      self.assertAlmostEqual(expected_variance, accumulator.variance)
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from tensorflow_data_validation.utils import variance_util
label_desc: Use image node_id 1 for calling the MeanVarAccumulatorTest obj's underlying member method code with example usage: obj.test_initialize_from_array(values, weights) without return types