code: def _dense_conditional(
      Xnew: tf.Tensor,
      X: tf.Tensor,
      kernel: Kernel,
      f: tf.Tensor,
      *,
      full_cov: bool = False,
      full_output_cov: bool = False,
      q_sqrt: Optional[tf.Tensor] = None,
      white: bool = False,
  ) -> MeanAndVariance:
      """
      Given f, representing the GP at the points X, produce the mean and
      (co-)variance of the GP at the points Xnew.
  
      Additionally, there may be Gaussian uncertainty about f as represented by
      q_sqrt. In this case `f` represents the mean of the distribution and
      q_sqrt the square-root of the covariance.
  
      Additionally, the GP may have been centered (whitened) so that::
  
          p(v) = 𝒩(𝟎, 𝐈)
          f = 𝐋v
  
      thus::
  
          p(f) = 𝒩(𝟎, 𝐋𝐋ᵀ) = 𝒩(𝟎, 𝐊).
  
      In this case `f` represents the values taken by v.
  
      The method can either return the diagonals of the covariance matrix for
      each output (default) or the full covariance matrix (full_cov=True).
  
      We assume R independent GPs, represented by the columns of f (and the
      first dimension of q_sqrt).
  
      :param Xnew: data matrix. Evaluate the GP at these new points
      :param X: data points.
      :param kernel: GPflow kernel.
      :param f: data matrix, representing the function values at X,
          for R functions.
      :param q_sqrt: matrix of standard-deviations or Cholesky matrices,
          size [M, R] or [R, M, M].
      :param white: boolean of whether to use the whitened representation as
          described above.
      :return: mean and variance
      """
      posterior = VGPPosterior(
          kernel=kernel,
          X=X,
          q_mu=f,
          q_sqrt=q_sqrt,
          white=white,
          precompute_cache=None,
      )
      return posterior.fused_predict_f(
          Xnew, full_cov=full_cov, full_output_cov=full_output_cov
      )
  
file_path: GPflow/gpflow/conditionals/conditionals.py
imports: from typing import Optional
  import tensorflow
  from check_shapes import check_shapes
  from ..base import MeanAndVariance
  from ..inducing_variables import InducingVariables
  from ..kernels import Kernel
  from ..posteriors import BasePosterior, VGPPosterior, get_posterior_class
  from .dispatch import conditional
label_desc: Use image node_id 2 for calling a global function with example usage: _dense_conditional(Xnew, X, kernel, f) and returns: posterior