code: def _expectation_gaussian_linear__linear(
      p: Gaussian,
      mean1: mfn.Linear,
      _: None,
      mean2: mfn.Linear,
      __: None,
      nghp: None = None,
  ) -> tf.Tensor:
      """
      Compute the expectation:
      expectation[n] = <m1(x_n)^T m2(x_n)>_p(x_n)
          - m1(.), m2(.) :: Linear mean functions
  
      :return: NxQ1xQ2
      """
      e_xxt = p.cov + (p.mu[:, :, None] * p.mu[:, None, :])  # NxDxD
      e_A1t_xxt_A2 = tf.einsum(
          "iq,nij,jz->nqz", mean1.A, e_xxt, mean2.A
      )  # NxQ1xQ2
      e_A1t_x_b2t = tf.einsum(
          "iq,ni,z->nqz", mean1.A, p.mu, mean2.b
      )  # NxQ1xQ2
      e_b1_xt_A2 = tf.einsum(
          "q,ni,iz->nqz", mean1.b, p.mu, mean2.A
      )  # NxQ1xQ2
      e_b1_b2t = mean1.b[:, None] * mean2.b[None, :]  # Q1xQ2
  
      return e_A1t_xxt_A2 + e_A1t_x_b2t + e_b1_xt_A2 + e_b1_b2t
  
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 8 for calling a global function with example usage: _expectation_gaussian_linear__linear(p, mean1, _, mean2, __, nghp) and returns: unknown