code: def test_constant_series(self):
      values = np.concatenate(
          [np.nan * np.ones([5]), np.ones([10]), np.nan * np.ones([5])],
          axis=0,
      )
      series = pd.Series(
          values,
          index=pd.date_range(
              "2020-01-01",
              periods=len(values),
              freq=pd.DateOffset(days=1),
          ),
      )
      predictions = anomaly_detection.detect_anomalies(
          series,
          seed=test_util.test_seed(sampler_type="stateless"),
          num_samples=50,
          num_warmup_steps=10,
          jit_compile=False,
      )
      self.assertAllClose(
          predictions.mean, tf.ones_like(predictions.mean), atol=0.1
      )
  
file_path: probability/tensorflow_probability/python/sts/anomaly_detection/anomaly_detection_test.py
imports: from absl.testing import parameterized
  import numpy
  import pandas
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.sts import anomaly_detection
label_desc: Use image node_id 6 for calling the AnomalyDetectionTests obj's underlying member method code with example usage: obj.test_constant_series() without return types