code: def test_nsdiffs_corner_cases(tst):
      # max_D must be a positive int
      with pytest.raises(ValueError):
          nsdiffs(austres, m=2, max_D=0, test=tst)
  
      # assert 0 for constant
      assert nsdiffs([1, 1, 1, 1], m=2, test=tst) == 0
  
      # show fails for m <= 1
      for m in (0, 1):
          with pytest.raises(ValueError):
              nsdiffs(austres, m=m, test=tst)
  
imports: from pmdarima.arima.seasonality import CHTest, decompose, OCSBTest
  from pmdarima.arima.utils import nsdiffs
  from pmdarima.compat.pytest import pytest_error_str
  from pmdarima.datasets import load_airpassengers, load_ausbeer, load_austres, load_wineind
  import numpy
  from numpy.testing import assert_almost_equal, assert_array_equal
  from sklearn.utils.validation import check_random_state
  import pytest
  from unittest import mock
label_desc: Use image node_id 6 for calling a global function with example usage: test_nsdiffs_corner_cases(tst) without return types