code: def test_beta(
      self, returns, benchmark_rets, rolling_window, expected
  ):
      actual = timeseries.rolling_beta(
          returns,
          benchmark_rets,
          rolling_window=rolling_window,
      ).values.tolist()[2]
  
      np.testing.assert_almost_equal(actual, expected)
  
imports: from __future__ import division
  import os
  from unittest import TestCase
  from nose_parameterized import parameterized
  from numpy.testing import assert_allclose, assert_almost_equal
  from pandas.util.testing import assert_series_equal
  import numpy
  import pandas
  from ..None import timeseries
  from pyfolio.utils import to_utc, to_series
  import gzip
label_desc: Use image node_id 2 for calling the TestStats obj's underlying member method code with example usage: obj.test_beta(returns, benchmark_rets, rolling_window, expected) without return types