code: def test_raises_for_kernel_with_grad(self) -> None:
      inputs = torch.rand(15, 1, device=self.device)
      train_train_kernel = (
          MaternKernel().to(self.device)(inputs).evaluate_kernel()
      )
      quality_scores = torch.ones(15, device=self.device)
      with self.assertRaisesRegex(
          UnsupportedError,
          "`_pivoted_cholesky_init` does not support using a `kernel_matrix` "
          "with `requires_grad=True`.",
      ):
          _pivoted_cholesky_init(
              train_inputs=inputs,
              kernel_matrix=train_train_kernel,
              max_length=10,
              quality_scores=quality_scores,
          )
  
imports: import gc
  import torch
  from botorch.exceptions.errors import UnsupportedError
  from botorch.models.approximate_gp import SingleTaskVariationalGP
  from botorch.models.utils.inducing_point_allocators import _pivoted_cholesky_init, ExpectedImprovementQualityFunction, GreedyImprovementReduction, GreedyVarianceReduction, UnitQualityFunction
  from botorch.utils.testing import BotorchTestCase
  from gpytorch.kernels import MaternKernel, ScaleKernel
  from gpytorch.likelihoods import GaussianLikelihood
  from gpytorch.mlls import VariationalELBO
label_desc: Use image node_id 2 for calling the TestPivotedCholeskyInit obj's underlying member method code with example usage: obj.test_raises_for_kernel_with_grad() without return types