code: def test_mll_computation(self):
      train_x, train_y = (torch.rand(10, 2), torch.rand(10))
      model = ExactGPModel(train_x, train_y)
      mll = ExactMarginalLogLikelihood(model.likelihood, model)
      output = model(train_x)
      marginal_log_likelihood = mll(output, train_y)
  
      marginal_likelihood = model.likelihood(output)
      noise_prior = next(model.likelihood.named_priors())[2]
      outputscale_prior = next(model.covar_module.named_priors())[2]
      lengthscale_prior = next(
          model.covar_module.base_kernel.named_priors()
      )[2]
  
      log_probs = [
          marginal_likelihood.log_prob(train_y),
          noise_prior.log_prob(model.likelihood.noise),
          outputscale_prior.log_prob(model.covar_module.outputscale),
          lengthscale_prior.log_prob(
              model.covar_module.base_kernel.lengthscale
          ).sum(),
      ]
      marginal_log_likelihood_by_hand = (
          sum(log_probs) / train_y.shape[0]
      )
  
      self.assertTrue(
          torch.allclose(
              marginal_log_likelihood, marginal_log_likelihood_by_hand
          )
      )
  
file_path: gpytorch/test/mlls/test_exact_marginal_log_likelihood.py
imports: import unittest
  import torch
  from gpytorch.constraints.constraints import GreaterThan
  from gpytorch.distributions.multivariate_normal import MultivariateNormal
  from gpytorch.kernels.matern_kernel import MaternKernel
  from gpytorch.kernels.scale_kernel import ScaleKernel
  from gpytorch.likelihoods.gaussian_likelihood import GaussianLikelihood
  from gpytorch.means.constant_mean import ConstantMean
  from gpytorch.mlls.exact_marginal_log_likelihood import ExactMarginalLogLikelihood
  from gpytorch.models.exact_gp import ExactGP
  from gpytorch.priors.torch_priors import GammaPrior
label_desc: Use image node_id 2 for calling the TestExactMarginalLogLikelihood obj's underlying member method code with example usage: obj.test_mll_computation() without return types