code: def test_spline_transformer_linear_regression(bias, intercept):
      """Test that B-splines fit a sinusodial curve pretty well."""
      X = np.linspace(0, 10, 100)[:, None]
      y = (
          np.sin(X[:, 0]) + 2
      )  # +2 to avoid the value 0 in assert_allclose
      pipe = Pipeline(
          steps=[
              (
                  "spline",
                  SplineTransformer(
                      n_knots=15,
                      degree=3,
                      include_bias=bias,
                      extrapolation="constant",
                  ),
              ),
              ("ols", LinearRegression(fit_intercept=intercept)),
          ]
      )
      pipe.fit(X, y)
      assert_allclose(pipe.predict(X), y, rtol=1e-3)
  
imports: import sys
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from scipy import sparse
  from scipy.interpolate import BSpline
  from scipy.sparse import random
  from sklearn.linear_model import LinearRegression
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import KBinsDiscretizer, PolynomialFeatures, SplineTransformer
  from sklearn.preprocessing._csr_polynomial_expansion import _calc_expanded_nnz, _calc_total_nnz, _get_sizeof_LARGEST_INT_t
  from sklearn.utils._testing import assert_array_almost_equal
  from sklearn.utils.fixes import CSC_CONTAINERS, CSR_CONTAINERS, parse_version, sp_version
label_desc: Use image node_id 7 for calling a global function with example usage: test_spline_transformer_linear_regression(bias, intercept) without return types