code: def _expectation_diagonal_product(
      p: DiagonalGaussian,
      kernel: kernels.Product,
      _: None,
      __: None,
      ___: None,
      nghp: None = None,
  ) -> tf.Tensor:
      r"""
      Compute the expectation:
      <\HadamardProd_i diag(Ki_{X[:, active_dims_i], X[:, active_dims_i]})>_p(X)
          - \HadamardProd_i Ki_{.,.} :: Product kernel
          - p                        :: DiagonalGaussian distribution (p.cov NxD)
  
      :return: N
      """
      if not kernel.on_separate_dimensions:
          raise NotImplementedError(
              "Product currently needs to be defined on separate dimensions."
          )  # pragma: no cover
  
      exps = [expectation(p, k, nghp=nghp) for k in kernel.kernels]
      return reduce(tf.multiply, exps)
  
file_path: GPflow/gpflow/expectations/products.py
imports: from functools import reduce
  from typing import Type
  import tensorflow
  from check_shapes import check_shapes
  from ..None import kernels
  from ..inducing_variables import InducingPoints
  from ..probability_distributions import DiagonalGaussian
  from .None import dispatch
  from .expectations import expectation
label_desc: Use image node_id 1 for calling a global function with example usage: _expectation_diagonal_product(p, kernel, _, __, ___, nghp) and returns: reduce