code: def test_train_continue_on_linalg_error(self, fit_mock):
      # Check that training does not stop on a NotPSDError error, but that uncertainty is increased!
      class Dummy:
          counter = 0
  
          def __call__(self, function_dist, target, *params):
              if self.counter >= 13:
                  return None
              else:
                  self.counter += 1
                  raise NotPSDError
  
      fit_mock.side_effect = Dummy()
  
      rs = np.random.RandomState(1)
      X, Y, n_dims = get_cont_data(rs)
  
      model = get_gp(n_dims, rs)
      model._train(X[:10], Y[:10], do_optimize=True)
  
      fixture = np.array(
          [0.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
      )
  
      hypers = model.hypers
  
      np.testing.assert_array_almost_equal(hypers, fixture)
  
imports: import unittest.mock
  import numpy
  import pyro
  import torch
  from botorch.models.kernels.categorical import CategoricalKernel
  from gpytorch.constraints.constraints import Interval
  from gpytorch.kernels import MaternKernel, ProductKernel, ScaleKernel
  from gpytorch.likelihoods.gaussian_likelihood import GaussianLikelihood
  from gpytorch.mlls.exact_marginal_log_likelihood import ExactMarginalLogLikelihood
  from gpytorch.models.exact_gp import ExactGP
  from gpytorch.priors import HorseshoePrior, LogNormalPrior, UniformPrior
  from gpytorch.utils.errors import NotPSDError
  from smac.configspace import CategoricalHyperparameter, ConfigurationSpace, UniformFloatHyperparameter
  from smac.model.gaussian_process.gpytorch_gaussian_process import GPyTorchGaussianProcess
  from ._test_gp import TestGP, get_cat_data, get_cont_data
label_desc: Use image node_id 7 for calling the TestGPGPyTorch obj's underlying member method code with example usage: obj.test_train_continue_on_linalg_error(fit_mock) and returns: None