code: def _expectation_gaussian_linear__identity(
      p: Gaussian,
      mean1: mfn.Linear,
      _: None,
      mean2: mfn.Identity,
      __: None,
      nghp: None = None,
  ) -> tf.Tensor:
      """
      Compute the expectation:
      expectation[n] = <m1(x_n)^T m2(x_n)>_p(x_n)
          - m1(.) :: Linear mean function
          - m2(.) :: Identity mean function
  
      :return: NxQxD
      """
      N = tf.shape(p.mu)[0]
      e_xxt = p.cov + (p.mu[:, :, None] * p.mu[:, None, :])  # NxDxD
      e_A_xxt = tf.linalg.matmul(
          tf.tile(mean1.A[None, ...], (N, 1, 1)),
          e_xxt,
          transpose_a=True,
      )  # NxQxD
      e_b_xt = mean1.b[None, :, None] * p.mu[:, None, :]  # NxQxD
  
      return e_A_xxt + e_b_xt
  
file_path: GPflow/gpflow/expectations/mean_functions.py
imports: from typing import Type, Union
  import tensorflow
  from check_shapes import check_shapes
  from ..None import mean_functions
  from ..probability_distributions import Gaussian
  from .None import dispatch
  from .expectations import expectation
label_desc: Use image node_id 7 for calling a global function with example usage: _expectation_gaussian_linear__identity(p, mean1, _, mean2, __, nghp) and returns: unknown