code: def test_partial_values2():
      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()
      alpha = 0.0
      # BUG: mask is incorrect if exog is not None, start_idx missing
      # bsplines = BSplines(x, degree=[3] * 2, df=[10] * 2)
      # glm_gam = GLMGam(y, exog=np.ones((len(y), 1)), smoother=bsplines,
      #                  alpha=alpha)
      bsplines = BSplines(
          x,
          degree=[3] * 2,
          df=[10] * 2,
          include_intercept=[True, False],
      )
      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)  # noqa: F841
  
      # case with constant column in exog is currently wrong
      # ex = np.column_stack((np.zeros((len(y), 1)), bsplines.smoothers[0].basis,
      #                       np.zeros_like(bsplines.smoothers[1].basis) ))
      ex = np.column_stack(
          (
              bsplines.smoothers[0].basis,
              np.zeros_like(bsplines.smoothers[1].basis),
          )
      )
  
      y_est = res_glm_gam.predict(ex, transform=False)
      y_partial_est, se = res_glm_gam.partial_values(0)
  
      assert_allclose(y_est, y_partial_est, atol=0.05)
      assert se.min() < 100
  
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 27 for calling a global function with example usage: test_partial_values2() without return types