code: def test_cov_params():
      np.random.seed(0)
      n = 1000
      x = np.random.uniform(0, 1, (n, 2))
      x = x - x.mean()
      y = x[:, 0] * x[:, 0] + np.random.normal(0, 0.01, n)
      y -= y.mean()
  
      bsplines = BSplines(
          x, degree=[3] * 2, df=[10] * 2, constraints="center"
      )
      alpha = [0, 0]
      glm_gam = GLMGam(y, smoother=bsplines, alpha=alpha)
      res_glm_gam = glm_gam.fit(
          method="pirls", max_start_irls=0, disp=0, maxiter=5000
      )
      glm = GLM(y, bsplines.basis)
      res_glm = glm.fit()
  
      assert_allclose(
          res_glm.cov_params(), res_glm_gam.cov_params(), rtol=0.0025
      )
  
      alpha = 1e-13
      glm_gam = GLMGam(y, smoother=bsplines, alpha=alpha)
      res_glm_gam = glm_gam.fit(
          method="pirls", max_start_irls=0, disp=0, maxiter=5000
      )
  
      assert_allclose(
          res_glm.cov_params(), res_glm_gam.cov_params(), atol=1e-10
      )
  
      res_glm_gam = glm_gam.fit(
          method="bfgs", max_start_irls=0, disp=0, maxiter=5000
      )
  
      assert_allclose(
          res_glm.cov_params(),
          res_glm_gam.cov_params(),
          rtol=1e-4,
          atol=1e-8,
      )
  
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 30 for calling a global function with example usage: test_cov_params() without return types