code: def test_pp():
      test = PPTest(alpha=0.05, lshort=True)
      pval, do_diff = test.should_diff(austres)
      assert do_diff
  
      # Result from R code: 0.9786066
      # > pp.test(austres, lshort=TRUE)$p.value
      assert_almost_equal(pval, 0.9786066, decimal=5)
  
      # test n diffs
      assert ndiffs(austres, test="pp", max_d=2) == 1
  
      # If we use lshort is FALSE, it will be different
      test = PPTest(alpha=0.05, lshort=False)
      pval, do_diff = test.should_diff(austres)
      assert do_diff
  
      # Result from R code: 0.9514589
      # > pp.test(austres, lshort=FALSE)$p.value
      assert_almost_equal(pval, 0.9514589, decimal=5)
      assert ndiffs(austres, test="pp", max_d=2, lshort=False) == 1
  
file_path: pmdarima/pmdarima/arima/tests/test_stationarity.py
imports: from pmdarima.arima.stationarity import ADFTest, PPTest, KPSSTest
  from pmdarima.arima.utils import ndiffs
  from pmdarima.utils.array import diff
  from pmdarima.datasets import load_austres
  from sklearn.utils import check_random_state
  from numpy.testing import assert_array_almost_equal, assert_almost_equal, assert_array_equal
  import numpy
  import pytest
label_desc: Use image node_id 8 for calling a global function with example usage: test_pp() without return types