code: def _make_posterior_predictive_mean_fn(
      kernel,
      mean_fn,
      inducing_index_points,
      variational_inducing_observations_loc,
      chol_kzz_fn,
      use_whitening_transform,
  ):
      """Define the VGP's variational posterior predictive mean function."""
  
      def _post_pred_mean_fn(index_points):
          """The variational posterior predictive mean function."""
          z = tf.convert_to_tensor(inducing_index_points)
          kzt = tf.linalg.LinearOperatorFullMatrix(
              kernel.matrix(z, index_points)
          )
  
          if use_whitening_transform:
              lin_op = tf.linalg.LinearOperatorLowerTriangular(
                  chol_kzz_fn()
              )
              mean_solve = lin_op.solvevec(
                  mean_fn(z)
                  + tf.zeros_like(variational_inducing_observations_loc)
              )
              kzzinv_varloc = lin_op.solvevec(
                  variational_inducing_observations_loc - mean_solve,
                  adjoint=True,
              )
          else:
              kzz = kernel.matrix(z, z)
              kzzinv_varloc = linalg.hpsd_solvevec(
                  kzz,
                  variational_inducing_observations_loc - mean_fn(z),
                  cholesky_matrix=chol_kzz_fn(),
              )
  
          return mean_fn(index_points) + kzt.matvec(
              kzzinv_varloc, adjoint=True
          )
  
      return _post_pred_mean_fn
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python import util
  from tensorflow_probability.python.bijectors import fill_scale_tril
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import cholesky_util
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import gaussian_process
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import mvn_linear_operator
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions.internal import stochastic_process_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math import linalg
  from tensorflow_probability.python.math.psd_kernels import positive_semidefinite_kernel
  from tensorflow_probability.python.math.psd_kernels.internal import util
label_desc: Use image node_id 1 for calling a global function with example usage: _make_posterior_predictive_mean_fn(kernel, mean_fn, inducing_index_points, variational_inducing_observations_loc, chol_kzz_fn, use_whitening_transform) and returns: _post_pred_mean_fn, unknown