code: def test_merges_random_array(
      self,
      array_size,
      distribution_mean,
      distribution_variance,
      use_weights,
  ):
      rng = np.random.default_rng(4444444)
      values = (
          rng.standard_normal(array_size)
          * np.sqrt(distribution_variance)
          + distribution_mean
      )
      weights = None
      if use_weights:
          weights = np.abs(rng.standard_normal(array_size))
      expected_mean = _weighted_mean(values, weights)
      expected_variance = _weighted_variance(values, weights)
      # Check a variety of splits of the data.
      for split in range(0, values.size, 1 + int(values.size / 100)):
          if weights is None:
              accumulator1 = variance_util.MeanVarAccumulator()
              accumulator1.update(values[:split])
              accumulator2 = variance_util.MeanVarAccumulator()
              accumulator2.update(values[split:])
  
          else:
              accumulator1 = variance_util.WeightedMeanVarAccumulator()
              accumulator1.update(values[:split], weights[:split])
              accumulator2 = variance_util.WeightedMeanVarAccumulator()
              accumulator2.update(values[split:], weights[split:])
          accumulator1.merge(accumulator2)
          self.assertLess(
              _rel_err(accumulator1.mean, expected_mean),
              _RELATIVE_ERROR_TOLERANCE,
          )
          self.assertLess(
              _rel_err(accumulator1.variance, expected_variance),
              _RELATIVE_ERROR_TOLERANCE,
          )
  
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 2 for calling the MeanVarAccumulatorTest obj's underlying member method code with example usage: obj.test_merges_random_array(array_size, distribution_mean, distribution_variance, use_weights) without return types