code: def test_kernel_ridge_singular_kernel():
      # alpha=0 causes a LinAlgError in computing the dual coefficients,
      # which causes a fallback to a lstsq solver. This is tested here.
      pred = Ridge(alpha=0, fit_intercept=False).fit(X, y).predict(X)
      kr = KernelRidge(kernel="linear", alpha=0)
      ignore_warnings(kr.fit)(X, y)
      pred2 = kr.predict(X)
      assert_array_almost_equal(pred, pred2)
  
file_path: scikit-learn/sklearn/tests/test_kernel_ridge.py
imports: import numpy
  import pytest
  from sklearn.datasets import make_regression
  from sklearn.kernel_ridge import KernelRidge
  from sklearn.linear_model import Ridge
  from sklearn.metrics.pairwise import pairwise_kernels
  from sklearn.utils._testing import assert_array_almost_equal, ignore_warnings
  from sklearn.utils.fixes import CSC_CONTAINERS, CSR_CONTAINERS
label_desc: Use image node_id 3 for calling a global function with example usage: test_kernel_ridge_singular_kernel() without return types