code: def test_corner_cases():
      with pytest.raises(ValueError):
          pm.auto_arima(wineind, error_action="some-bad-string")
  
      # things that produce warnings
      with pytest.warns(UserWarning):
          # show a constant result will result in a quick fit
          pm.auto_arima(np.ones(10), suppress_warnings=True)
  
          # show the same thing with return_all results in the ARIMA in a list
          fits = pm.auto_arima(
              np.ones(10),
              suppress_warnings=True,
              return_valid_fits=True,
          )
          assert hasattr(fits, "__iter__")
  
      # show we fail for n_fits < 0
      with pytest.raises(ValueError):
          pm.auto_arima(np.ones(10), random=True, n_fits=-1)
  
      # show if max* < start* it breaks:
      with pytest.raises(ValueError):
          pm.auto_arima(np.ones(10), start_p=5, max_p=0)
  
imports: import numpy
  import pandas
  import pmdarima
  from pmdarima.arima import auto
  from pmdarima.arima.utils import nsdiffs
  from pmdarima.warnings import ModelFitWarning
  from pmdarima.compat.pytest import pytest_error_str, pytest_warning_messages
  from numpy.testing import assert_allclose
  from numpy.testing import assert_array_almost_equal
  import os
  from os.path import abspath, dirname
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_corner_cases() without return types