code: def test_conditional_whiten(
      Xnew, X, kernel, f_loc, f_scale_tril, loc, cov
  ):
      if f_scale_tril is None:
          return
  
      loc0, cov0 = conditional(
          Xnew,
          X,
          kernel,
          f_loc,
          f_scale_tril,
          full_cov=True,
          whiten=False,
      )
      Kff = kernel(X) + torch.eye(3) * 1e-6
      Lff = torch.linalg.cholesky(Kff)
      whiten_f_loc = Lff.inverse().matmul(f_loc)
      whiten_f_scale_tril = Lff.inverse().matmul(f_scale_tril)
      loc1, cov1 = conditional(
          Xnew,
          X,
          kernel,
          whiten_f_loc,
          whiten_f_scale_tril,
          full_cov=True,
          whiten=True,
      )
  
      assert_equal(loc0, loc1)
      assert_equal(cov0, cov1)
  
file_path: pyro/tests/contrib/gp/test_conditional.py
imports: from collections import namedtuple
  import pytest
  import torch
  import pyro
  from pyro.contrib.gp.kernels import Matern52, WhiteNoise
  from pyro.contrib.gp.util import conditional
  from tests.common import assert_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_conditional_whiten(Xnew, X, kernel, f_loc, f_scale_tril, loc, cov) without return types