code: def test_rolling_mean(self):
      x = np.arange(10)
      h = np.arange(10)
      df = diagnostics.rolling_mean_by_h(x=x, h=h, w=1, name="x")
      assert np.array_equal(x, df["x"].values)
      assert np.array_equal(h, df["horizon"].values)
  
      df = diagnostics.rolling_mean_by_h(x, h, w=4, name="x")
      assert np.allclose(x[3:] - 1.5, df["x"].values)
      assert np.array_equal(np.arange(3, 10), df["horizon"].values)
  
      h = np.array([1.0, 2.0, 3.0, 4.0, 4.0, 4.0, 4.0, 4.0, 7.0, 7.0])
      x_true = np.array([1.0, 5.0, 22.0 / 3])
      h_true = np.array([3.0, 4.0, 7.0])
      df = diagnostics.rolling_mean_by_h(x, h, w=3, name="x")
      assert np.allclose(x_true, df["x"].values)
      assert np.array_equal(h_true, df["horizon"].values)
  
      df = diagnostics.rolling_mean_by_h(x, h, w=10, name="x")
      assert np.allclose(np.array([7.0]), df["horizon"].values)
      assert np.allclose(np.array([4.5]), df["x"].values)
  
imports: import datetime
  import itertools
  import numpy
  import pandas
  import pytest
  from prophet import Prophet, diagnostics
label_desc: Use image node_id 2 for calling the TestPerformanceMetrics obj's underlying member method code with example usage: obj.test_rolling_mean() without return types