code: def test_check_stats_data_raises(
      load_pos_data_missing, test, supports_missing
  ):
      """Tests the check_stats functionality on the data with missing values.
      Not all tests support this and this checks that these tests flag this appropriately.
      """
  
      exp = TSForecastingExperiment()
      data = load_pos_data_missing
  
      # Reduced fh since we are testing with small dataset as well
      fh = 1
      fold = 2
  
      exp.setup(
          data=data,
          fh=fh,
          fold=fold,
          fold_strategy="sliding",
          numeric_imputation_target="drift",
          verbose=False,
          session_id=42,
      )
  
      # raise MissingValueError if test does not support it.
      if not supports_missing:
          with pytest.raises(MissingDataError) as errmsg:
              _ = exp.check_stats(test=test, data_type="original")
  
          # Capture Error message
          exceptionmsg = errmsg.value.args[0]
  
          # Check exact error received
          assert (
              "can not be run on data with missing values. Please check input data type."
              in exceptionmsg
          )
  
imports: import pytest
  from time_series_test_utils import _ALL_DATA_TYPES, _ALL_STATS_TESTS, _ALL_STATS_TESTS_MISSING_DATA, _return_data_big_small, _return_model_names_for_plots_stats
  from pycaret.time_series import TSForecastingExperiment
  from pycaret.utils.time_series.exceptions import MissingDataError
label_desc: Use image node_id 4 for calling a global function with example usage: test_check_stats_data_raises(load_pos_data_missing, test, supports_missing) without return types