code: def test_for_older_version():
      # Fit an ARIMA
      arima = ARIMA(order=(0, 0, 0), trend="c", suppress_warnings=True)
  
      # There are three possibilities here:
      # 1. The model is serialized/deserialized BEFORE it has been fit.
      #    This means we should not get a warning.
      #
      # 2. The model is saved after being fit, but it does not have a
      #    pkg_version_ attribute due to it being an old (very old) version.
      #    We still warn for this
      #
      # 3. The model is saved after the fit, and it's version does not match.
      #    We warn for this.
      for case, do_fit, expect_warning in [
          (1, False, False),
          (2, True, True),
          (3, True, True),
      ]:
          # Only fit it if we should
          if do_fit:
              arima.fit(y)
  
          # If it's case 2, we remove the pkg_version_. If 3, we set it low
          if case == 2:
              delattr(arima, "pkg_version_")
          elif case == 3:
              arima.pkg_version_ = (
                  "0.0.1"  # will always be < than current
              )
  
          with tempfile.TemporaryDirectory() as tdir:
              pickle_file = os.path.join(tdir, "model.pkl")
              joblib.dump(arima, pickle_file)
  
              # Now unpickle it and show that we get a warning (if expected)
              if expect_warning:
                  with pytest.warns(UserWarning):
                      arm = joblib.load(pickle_file)  # type: ARIMA
              else:
                  arm = joblib.load(pickle_file)  # type: ARIMA
  
              # we can still produce predictions (only if we fit)
              if do_fit:
                  arm.predict(n_periods=4)
  
imports: import numpy
  import pandas
  from pmdarima.arima import ARIMA, auto_arima, AutoARIMA, ARMAtoMA
  from pmdarima.arima import _validation
  from pmdarima.compat.pytest import pytest_error_str
  from pmdarima.datasets import load_lynx, load_wineind, load_heartrate
  from numpy.random import RandomState
  from numpy.testing import assert_array_almost_equal, assert_almost_equal, assert_allclose
  from statsmodels import api
  from sklearn.metrics import mean_squared_error
  import datetime
  import joblib
  import os
  import pickle
  import pytest
  import tempfile
  import time
label_desc: Use image node_id 17 for calling a global function with example usage: test_for_older_version() without return types