code: def test_r_equivalency(self, X):
      y = self.y
      expected = self.expected
  
      trans = FourierFeaturizer(m=5, k=2).fit(y)
      _, xreg = trans.transform(y, X)
  
      # maybe subset
      if hasattr(xreg, "iloc"):
          xreg = xreg.values
      assert_array_almost_equal(expected, xreg[:, -4:])
  
      # maybe assert on X
      if X is not None:
          assert_array_almost_equal(X, xreg[:, :3])
  
          # Test a bad forecast (X dim does not match n_periods dim)
          with pytest.raises(ValueError):
              trans.transform(y, np.random.rand(5, 3), n_periods=2)
  
file_path: pmdarima/pmdarima/preprocessing/exog/tests/test_fourier.py
imports: import numpy
  from numpy.testing import assert_array_almost_equal
  from pmdarima.preprocessing.exog import FourierFeaturizer
  from pmdarima.compat.pytest import pytest_error_str
  import pmdarima
  import pytest
label_desc: Use image node_id 1 for calling the TestFourierREquivalency obj's underlying member method code with example usage: obj.test_r_equivalency(X) without return types