code: def testInitialValueOfMaskedTimeSeries(self):
      if not self.use_static_shape:
          return  # Dynamic rank is not currently supported.
  
      series = tf.random.stateless_normal(
          [2, 1, 3, 4],
          seed=test_util.test_seed(sampler_type="stateless"),
      )
      mask = np.array(
          [
              [False, True, False, True],
              [True, False, True, False],
              # Ensure no error if a batch element is fully masked.
              [True, True, True, True],
          ]
      )
      expected_initial_values = distribution_util.move_dimension(
          tf.convert_to_tensor(
              [series[..., 0, 0], series[..., 1, 1], series[..., 2, 3]]
          ),
          source_idx=0,
          dest_idx=-1,
      )
  
      (
          initial_values,
          first_unmasked_indices,
      ) = missing_values_util.initial_value_of_masked_time_series(
          self._build_tensor(self.evaluate(series)),
          broadcast_mask=self._build_tensor(
              self.evaluate(tf.broadcast_to(mask, series.shape)),
              dtype=np.bool_,
          ),
      )
  
      self.assertAllClose(
          self.evaluate(initial_values), expected_initial_values
      )
      self.assertAllEqual(
          tf.broadcast_to(np.array([0, 1, 4]), [2, 1, 3]),
          first_unmasked_indices,
      )
  
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 2 for calling the _MissingValuesUtilityTests obj's underlying member method code with example usage: obj.testInitialValueOfMaskedTimeSeries() without return types