code: def testMoments(self):
      series = np.random.randn(2, 4)
      mask = np.array(
          [[False, True, False, True], [True, False, True, False]]
      )
      unmasked_entries = [
          [series[0, 0], series[0, 2]],
          [series[1, 1], series[1, 3]],
      ]
      expected_mean = np.mean(unmasked_entries, axis=-1).astype(
          self.dtype
      )
      expected_variance = np.var(unmasked_entries, axis=-1).astype(
          self.dtype
      )
  
      (
          mean,
          variance,
      ) = missing_values_util.moments_of_masked_time_series(
          self._build_tensor(series),
          broadcast_mask=self._build_tensor(mask, dtype=np.bool_),
      )
  
      mean_, variance_ = self.evaluate((mean, variance))
      self.assertAllClose(mean_, expected_mean)
      self.assertAllClose(variance_, expected_variance)
  
file_path: probability/tensorflow_probability/python/sts/internal/missing_values_util_test.py
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.sts.internal import missing_values_util
label_desc: Use image node_id 1 for calling the _MissingValuesUtilityTests obj's underlying member method code with example usage: obj.testMoments() without return types