code: def init_class_fixtures(cls):
      super(StatisticalBuiltInsTestCase, cls).init_class_fixtures()
  
      day = cls.trading_calendar.day
      cls.dates = dates = date_range(
          "2015-02-01",
          "2015-02-28",
          freq=day,
          tz="UTC",
      )
  
      # Using these start and end dates because they are a contigous span of
      # 5 days (Monday - Friday) and they allow for plenty of days to look
      # back on when computing correlations and regressions.
      cls.start_date_index = start_date_index = 14
      cls.end_date_index = end_date_index = 18
      cls.pipeline_start_date = dates[start_date_index]
      cls.pipeline_end_date = dates[end_date_index]
      cls.num_days = num_days = end_date_index - start_date_index + 1
  
      sids = cls.sids
      cls.assets = assets = cls.asset_finder.retrieve_all(sids)
      cls.my_asset_column = my_asset_column = 0
      cls.my_asset = assets[my_asset_column]
      cls.num_assets = num_assets = len(assets)
  
      cls.raw_data = raw_data = DataFrame(
          data=arange(
              len(dates) * len(sids), dtype=float64_dtype
          ).reshape(
              len(dates),
              len(sids),
          ),
          index=dates,
          columns=assets,
      )
  
      # Using mock 'close' data here because the correlation and regression
      # built-ins use USEquityPricing.close as the input to their `Returns`
      # factors. Since there is no way to change that when constructing an
      # instance of these built-ins, we need to test with mock 'close' data
      # to most accurately reflect their true behavior and results.
      close_loader = DataFrameLoader(USEquityPricing.close, raw_data)
  
      cls.run_pipeline = SimplePipelineEngine(
          {USEquityPricing.close: close_loader}.__getitem__,
          cls.asset_finder,
          default_domain=US_EQUITIES,
      ).run_pipeline
  
      cls.cascading_mask = AssetIDPlusDay() < (
          sids[-1] + dates[start_date_index].day
      )
      cls.expected_cascading_mask_result = make_cascading_boolean_array(
          shape=(num_days, num_assets),
      )
      cls.alternating_mask = (AssetIDPlusDay() % 2).eq(0)
      cls.expected_alternating_mask_result = (
          make_alternating_boolean_array(
              shape=(num_days, num_assets),
          )
      )
      cls.expected_no_mask_result = full(
          shape=(num_days, num_assets),
          fill_value=True,
          dtype=bool_dtype,
      )
  
imports: import numpy
  from numpy import arange, full, full_like, nan, where
  from pandas import DataFrame, date_range, Int64Index, Timestamp
  from pandas.util.testing import assert_frame_equal
  from scipy.stats import linregress, pearsonr, spearmanr
  from empyrical.stats import beta_aligned
  from zipline.assets import Equity, ExchangeInfo
  from zipline.errors import IncompatibleTerms, NonExistentAssetInTimeFrame
  from zipline.pipeline import CustomFactor, Pipeline
  from zipline.pipeline.data import USEquityPricing
  from zipline.pipeline.data.testing import TestingDataSet
  from zipline.pipeline.domain import US_EQUITIES
  from zipline.pipeline.engine import SimplePipelineEngine
  from zipline.pipeline.factors import Returns, RollingLinearRegressionOfReturns, RollingPearsonOfReturns, RollingSpearmanOfReturns, SimpleBeta
  from zipline.pipeline.factors.statistical import vectorized_beta, vectorized_pearson_r
  from zipline.pipeline.loaders.frame import DataFrameLoader
  from zipline.pipeline.sentinels import NotSpecified
  from zipline.testing import AssetID, AssetIDPlusDay, check_arrays, make_alternating_boolean_array, make_cascading_boolean_array, parameter_space
  import zipline.testing.fixtures
  from zipline.testing.predicates import assert_equal
  from zipline.utils.numpy_utils import as_column, bool_dtype, datetime64ns_dtype, float64_dtype
label_desc: Use image node_id 1 for calling the StatisticalBuiltInsTestCase obj's underlying member method code with example usage: obj.init_class_fixtures(cls) without return types