code: def test_cv_predictions(cv, est, avg, return_raw_predictions):
      preds = cross_val_predict(
          est,
          y,
          cv=cv,
          verbose=4,
          averaging=avg,
          return_raw_predictions=return_raw_predictions,
      )
      assert isinstance(preds, np.ndarray)
      if return_raw_predictions:
          assert preds.shape[0] == len(y)
          assert preds.shape[1] == cv.horizon
      else:
          assert preds.ndim == 1
  
file_path: pmdarima/pmdarima/model_selection/tests/test_validation.py
imports: from pmdarima.arima import ARIMA
  from pmdarima.warnings import ModelFitWarning
  from pmdarima.compat.pytest import pytest_error_str
  from pmdarima.pipeline import Pipeline
  from pmdarima.preprocessing import FourierFeaturizer
  from pmdarima.model_selection._split import RollingForecastCV, SlidingWindowForecastCV
  from pmdarima.model_selection._validation import cross_val_score, _check_scoring, cross_validate, cross_val_predict, _check_averaging
  from pmdarima.datasets import load_airpassengers
  import pytest
  import numpy
  from unittest import mock
label_desc: Use image node_id 2 for calling a global function with example usage: test_cv_predictions(cv, est, avg, return_raw_predictions) without return types