code: def test_pickle_wrapper(self):
      fh = BytesIO()  # use pickle with binary content
  
      # test unwrapped results load save pickle
      self.results._results.save(fh)
      fh.seek(0, 0)
      res_unpickled = self.results._results.__class__.load(fh)
      assert type(res_unpickled) is type(
          self.results._results
      )  # noqa: E721
  
      # test wrapped results load save
      fh.seek(0, 0)
      self.results.save(fh)
      fh.seek(0, 0)
      res_unpickled = self.results.__class__.load(fh)
      fh.close()
      assert type(res_unpickled) is type(self.results)  # noqa: E721
  
      before = sorted(self.results.__dict__.keys())
      after = sorted(res_unpickled.__dict__.keys())
      assert before == after, "not equal {!r} and {!r}".format(
          before, after
      )
  
      before = sorted(self.results._results.__dict__.keys())
      after = sorted(res_unpickled._results.__dict__.keys())
      assert before == after, "not equal {!r} and {!r}".format(
          before, after
      )
  
      before = sorted(self.results.model.__dict__.keys())
      after = sorted(res_unpickled.model.__dict__.keys())
      assert before == after, "not equal {!r} and {!r}".format(
          before, after
      )
  
      before = sorted(self.results._cache.keys())
      after = sorted(res_unpickled._cache.keys())
      assert before == after, "not equal {!r} and {!r}".format(
          before, after
      )
  
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 4 for calling the RemoveDataPickle obj's underlying member method code with example usage: obj.test_pickle_wrapper() without return types