code: def test_remove_data_pickle(self):
      results = self.results
      xf = self.xf
      pred_kwds = self.predict_kwds
      pred1 = results.predict(xf, **pred_kwds)
      # create some cached attributes
      results.summary()
      results.summary2()  # SMOKE test also summary2
  
      # uncomment the following to check whether tests run (7 failures now)
      # np.testing.assert_equal(res, 1)
  
      # check pickle unpickle works on full results
      # TODO: drop of load save is tested
      res, orig_nbytes = check_pickle(results._results)
  
      # remove data arrays, check predict still works
      results.remove_data()
  
      pred2 = results.predict(xf, **pred_kwds)
  
      if isinstance(pred1, pd.Series) and isinstance(pred2, pd.Series):
          assert_series_equal(pred1, pred2)
      elif isinstance(pred1, pd.DataFrame) and isinstance(
          pred2, pd.DataFrame
      ):
          assert pred1.equals(pred2)
      else:
          np.testing.assert_equal(pred2, pred1)
  
      # pickle and unpickle reduced array
      res, nbytes = check_pickle(results._results)
  
      # for testing attach res
      self.res = res
      msg = "pickle length not %d < %d" % (nbytes, orig_nbytes)
      assert nbytes < orig_nbytes * self.reduction_factor, msg
      pred3 = results.predict(xf, **pred_kwds)
  
      if isinstance(pred1, pd.Series) and isinstance(pred3, pd.Series):
          assert_series_equal(pred1, pred3)
      elif isinstance(pred1, pd.DataFrame) and isinstance(
          pred3, pd.DataFrame
      ):
          assert pred1.equals(pred3)
      else:
          np.testing.assert_equal(pred3, pred1)
  
imports: from statsmodels.compat.pandas import assert_series_equal
  from io import BytesIO
  import pickle
  import numpy
  import pandas
  import statsmodels.api
label_desc: Use image node_id 2 for calling the RemoveDataPickle obj's underlying member method code with example usage: obj.test_remove_data_pickle() without return types