code: def test_cyclic_cubic_splines():
      cur_dir = os.path.dirname(os.path.abspath(__file__))
      file_path = os.path.join(
          cur_dir, "results", "cubic_cyclic_splines_from_mgcv.csv"
      )
      data_from_r = pd.read_csv(file_path)
  
      x = data_from_r[["x0", "x2"]].values
      y = data_from_r["y"].values
      y_est_mgcv = data_from_r[["y_est"]].values  # noqa: F841
      s_mgcv = data_from_r[["s(x0)", "s(x2)"]].values
  
      dfs = [10, 10]
      ccs = CyclicCubicSplines(x, df=dfs)
      alpha = [0.05 / 2, 0.0005 / 2]
      # TODO: if alpha changes in pirls this should be updated
  
      gam = GLMGam(y, smoother=ccs, alpha=alpha)
      gam_res = gam.fit(method="pirls")
  
      s0 = np.dot(
          ccs.basis[:, ccs.mask[0]], gam_res.params[ccs.mask[0]]
      )
      # TODO: Mean has to be removed
      # removing mean could be replaced by options for intercept handling
      s0 -= s0.mean()
  
      s1 = np.dot(
          ccs.basis[:, ccs.mask[1]], gam_res.params[ccs.mask[1]]
      )
      s1 -= s1.mean()  # TODO: Mean has to be removed
  
      # plt.subplot(2, 1, 1)
      # plt.plot(x[:, 0], s0, '.', label='s0')
      # plt.plot(x[:, 0], s_mgcv[:, 0], '.', label='s0_mgcv')
      # plt.legend(loc='best')
      #
      # plt.subplot(2, 1, 2)
      # plt.plot(x[:, 1], s1, '.', label='s1_est')
      # plt.plot(x[:, 1], s_mgcv[:, 1], '.', label='s1_mgcv')
      # plt.legend(loc='best')
      # plt.show()
  
      assert_allclose(s0, s_mgcv[:, 0], atol=0.02)
      assert_allclose(s1, s_mgcv[:, 1], atol=0.33)
  
imports: import os
  import numpy
  from numpy.testing import assert_allclose
  import pandas
  from scipy.linalg import block_diag
  import pytest
  from statsmodels.tools.linalg import matrix_sqrt
  from statsmodels.gam.smooth_basis import UnivariatePolynomialSmoother, PolynomialSmoother, BSplines, GenericSmoothers, UnivariateCubicSplines, CyclicCubicSplines
  from statsmodels.gam.generalized_additive_model import GLMGam, LogitGam, make_augmented_matrix, penalized_wls
  from statsmodels.gam.gam_cross_validation.gam_cross_validation import MultivariateGAMCV, MultivariateGAMCVPath, _split_train_test_smoothers
  from statsmodels.gam.gam_penalties import UnivariateGamPenalty, MultivariateGamPenalty
  from statsmodels.gam.gam_cross_validation.cross_validators import KFold
  from statsmodels.genmod.generalized_linear_model import GLM
  from statsmodels.genmod.families.family import Gaussian
  from statsmodels.genmod.generalized_linear_model import lm
label_desc: Use image node_id 22 for calling a global function with example usage: test_cyclic_cubic_splines() without return types