docstr: Given a Normal distribution for the latent function,
  return the mean of Y
  
  if
      q(f) = N(Fmu, Fvar)
  
  and this object represents
  
      p(y|f)
  
  then this method computes the predictive mean
  
     ∫∫ y p(y|f)q(f) df dy
  
  and the predictive variance
  
     ∫∫ y² p(y|f)q(f) df dy  - [ ∫∫ y p(y|f)q(f) df dy ]²
  
  Here, we implement a default Monte Carlo routine.
docstr_tok: ["Given","a","Normal","distribution","for","the","latent","function",",","return","the","mean","of","Y","if","q","(","f",")","=","N","(","Fmu",",","Fvar",")","and","this","object","represents","p","(","y|f",")","then","this","method","computes","the","predictive","mean","\u222b\u222b","y","p","(","y|f",")","q","(","f",")","df","dy","and","the","predictive","variance","\u222b\u222b","y\u00b2","p","(","y|f",")","q","(","f",")","df","dy","-","[","\u222b\u222b","y","p","(","y|f",")","q","(","f",")","df","dy","]","\u00b2","Here",",","we","implement","a","default","Monte","Carlo","routine","."]
code: def _predict_mean_and_var(
      self,
      X: TensorType,
      Fmu: TensorType,
      Fvar: TensorType,
      epsilon: Optional[TensorType] = None,
  ) -> MeanAndVariance:
      r"""
      Given a Normal distribution for the latent function,
      return the mean of Y
  
      if
          q(f) = N(Fmu, Fvar)
  
      and this object represents
  
          p(y|f)
  
      then this method computes the predictive mean
  
         ∫∫ y p(y|f)q(f) df dy
  
      and the predictive variance
  
         ∫∫ y² p(y|f)q(f) df dy  - [ ∫∫ y p(y|f)q(f) df dy ]²
  
      Here, we implement a default Monte Carlo routine.
      """
  
      def conditional_mean(F: TensorType, X_: TensorType) -> TensorType:
          return self.conditional_mean(X_, F)
  
      def conditional_y_squared(
          F: TensorType, X_: TensorType
      ) -> TensorType:
          return self.conditional_variance(X_, F) + tf.square(
              self.conditional_mean(X_, F)
          )
  
      E_y, E_y2 = self._mc_quadrature(
          [conditional_mean, conditional_y_squared],
          Fmu,
          Fvar,
          epsilon=epsilon,
          X_=X,
      )
      V_y = E_y2 - tf.square(E_y)
      return E_y, V_y
  
imports: import abc
  from typing import Any, Callable, Iterable, Optional, Sequence, Union
  import tensorflow
  from check_shapes import check_shapes, inherit_check_shapes
  from ..base import MeanAndVariance, Module, TensorType
  from ..quadrature import GaussianQuadrature, NDiagGHQuadrature, ndiag_mc
label_desc: Use image node_id 3 for calling the MonteCarloLikelihood obj's underlying member method code with example usage: obj._predict_mean_and_var(X, Fmu, Fvar, epsilon) and returns: E_y,  V_y, self, unknown