code: def test_augmented_gp(self):
      X_in = torch.from_numpy(self.X_in)
      Y_in = torch.from_numpy(self.Y_in)
      X_out = torch.from_numpy(self.X_out)
      Y_out = torch.from_numpy(self.Y_out)
  
      augmented_gp = AugmentedLocalGaussianProcess(
          X_in,
          Y_in,
          X_out,
          Y_out,
          self.gp_model.likelihood,
          self.kernel,
      ).double()
      exact_gp = ExactGaussianProcessModel(
          X_in, Y_in, self.kernel, self.gp_model.likelihood
      ).double()
  
      # if augmented_gp.augmented is false, it should behave the same as an exact gp
      output_agp = augmented_gp(X_in)
      output_exact_gp = exact_gp(X_in)
      torch.testing.assert_allclose(
          output_agp.mean, output_exact_gp.mean
      )
      torch.testing.assert_allclose(
          output_agp.covariance_matrix,
          output_exact_gp.covariance_matrix,
      )
  
      augmented_gp.eval()
      exact_gp.eval()
      output_agp = augmented_gp(X_out)
      output_exact_gp = exact_gp(X_out)
  
      torch.testing.assert_allclose(
          output_agp.mean, output_exact_gp.mean
      )
      torch.testing.assert_allclose(
          output_agp.covariance_matrix,
          output_exact_gp.covariance_matrix,
      )
  
      # now augmentd_gp is augmented with inducing points, it no longer provides the same output as exact gp
      augmented_gp.set_augment_module(
          X_inducing=torch.ones([1, self.num_dims])
      )
      augmented_gp.eval()
      output_agp = augmented_gp(X_out)
      self.assertFalse(
          torch.equal(output_agp.mean, output_exact_gp.mean)
      )
      self.assertFalse(
          torch.equal(
              output_agp.covariance_matrix,
              output_exact_gp.covariance_matrix,
          )
      )
  
imports: from typing import Tuple
  import unittest.mock
  import gpytorch
  import numpy
  import pyro
  import torch
  from gpytorch.constraints.constraints import Interval
  from gpytorch.likelihoods.gaussian_likelihood import GaussianLikelihood
  from gpytorch.priors import HorseshoePrior
  from smac.configspace import ConfigurationSpace, UniformFloatHyperparameter
  from smac.model.gaussian_process.augmented_local_gaussian_process import AugmentedLocalGaussianProcess, GloballyAugmentedLocalGaussianProcess
  from smac.model.gaussian_process.gpytorch_gaussian_process import ExactGaussianProcessModel
  from ._test_boing_kernel import generate_kernel, generate_test_data
  from ._test_gp_gpytorch import TestGPGPyTorch
label_desc: Use image node_id 6 for calling the TestLGPGA obj's underlying member method code with example usage: obj.test_augmented_gp() without return types