code: def test_decompose_happy_path(x, type_, m, filter_):
      decomposed_tuple = decompose(x, type_, m, filter_)
      first_ind = int(m / 2)
      last_ind = -int(m / 2)
      x = decomposed_tuple.x[first_ind:last_ind]
      trend = decomposed_tuple.trend[first_ind:last_ind]
      seasonal = decomposed_tuple.seasonal[first_ind:last_ind]
      random = decomposed_tuple.random[first_ind:last_ind]
  
      if type_ == "multiplicative":
          reconstructed_x = trend * seasonal * random
      else:
          reconstructed_x = trend + seasonal + random
  
      assert_almost_equal(x, reconstructed_x)
  
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 1 for calling a global function with example usage: test_decompose_happy_path(x, type_, m, filter_) without return types