code: def test_expanding(basic_data):
      y, x, w = basic_data
      xa = np.asarray(x)
      mod = RollingOLS(y, x, 150, min_nobs=50, expanding=True)
      res = mod.fit()
      params = np.asarray(res.params)
      assert np.all(np.isnan(params[:49]))
      first = np.where(
          np.cumsum(np.all(np.isfinite(xa), axis=1)) >= 50
      )[0][0]
      assert np.all(np.isfinite(params[first:]))
  
imports: from io import BytesIO
  from itertools import product
  import warnings
  import numpy
  import pandas
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from statsmodels import tools
  from statsmodels.regression.linear_model import WLS
  from statsmodels.regression.rolling import RollingWLS, RollingOLS
label_desc: Use image node_id 18 for calling a global function with example usage: test_expanding(basic_data) without return types