code: def _expectation_gaussian__sqe_inducingpoints(
      p: Gaussian,
      mean: mfn.Identity,
      _: None,
      kernel: kernels.SquaredExponential,
      inducing_variable: InducingPoints,
      nghp: None = None,
  ) -> tf.Tensor:
      """
      Compute the expectation:
      expectation[n] = <x_n K_{x_n, Z}>_p(x_n)
          - K_{.,.} :: RBF kernel
  
      :return: NxDxM
      """
      Xmu, Xcov = p.mu, p.cov
  
      D = tf.shape(Xmu)[1]
  
      lengthscales = kernel.lengthscales
      if not kernel.ard:
          lengthscales = (
              tf.zeros((D,), dtype=lengthscales.dtype) + lengthscales
          )
  
      chol_L_plus_Xcov = tf.linalg.cholesky(
          tf.linalg.diag(lengthscales**2) + Xcov
      )  # NxDxD
      all_diffs = tf.transpose(inducing_variable.Z) - tf.expand_dims(
          Xmu, 2
      )  # NxDxM
  
      sqrt_det_L = tf.reduce_prod(lengthscales)
      sqrt_det_L_plus_Xcov = tf.exp(
          tf.reduce_sum(
              tf.math.log(tf.linalg.diag_part(chol_L_plus_Xcov)), axis=1
          )
      )
      determinants = sqrt_det_L / sqrt_det_L_plus_Xcov  # N
  
      exponent_mahalanobis = tf.linalg.cholesky_solve(
          chol_L_plus_Xcov, all_diffs
      )  # NxDxM
      non_exponent_term = tf.linalg.matmul(
          Xcov, exponent_mahalanobis, transpose_a=True
      )
      non_exponent_term = (
          tf.expand_dims(Xmu, 2) + non_exponent_term
      )  # NxDxM
  
      exponent_mahalanobis = tf.reduce_sum(
          all_diffs * exponent_mahalanobis, 1
      )  # NxM
      exponent_mahalanobis = tf.exp(-0.5 * exponent_mahalanobis)  # NxM
  
      return (
          kernel.variance
          * (determinants[:, None] * exponent_mahalanobis)[:, None, :]
          * non_exponent_term
      )
  
file_path: GPflow/gpflow/expectations/squared_exponentials.py
imports: from typing import Type, Union
  import tensorflow
  from check_shapes import check_shapes
  from ..None import kernels
  from ..None import mean_functions
  from ..inducing_variables import InducingPoints
  from ..probability_distributions import DiagonalGaussian, Gaussian, MarkovGaussian
  from ..utilities.ops import square_distance
  from .None import dispatch
  from .expectations import expectation
label_desc: Use image node_id 3 for calling a global function with example usage: _expectation_gaussian__sqe_inducingpoints(p, mean, _, kernel, inducing_variable, nghp) and returns: unknown