code: def logit_normal_mean_gh(loc, scale, deg):
      """Approximates `E_{N(m,s)}[sigmoid(X)]` by Gauss-Hermite quadrature."""
      # We want to integrate
      # A = \int_-inf^inf sigmoid(x) * Normal(loc, scale).pdf(x) dx
      # To bring it into the right form for Gauss-Hermite quadrature,
      # we make the substitution y = (x - loc) / scale, to get
      # A = (1/sqrt(2*pi)) * \int_-inf^inf [
      #       sigmoid(y * scale + loc) * exp(-1/2 y**2) dy]
      grid, weights = onp.polynomial.hermite_e.hermegauss(deg)
      grid = tf.cast(grid, dtype=loc.dtype)
      weights = tf.cast(weights, dtype=loc.dtype)
      normalizer = tf.constant(onp.sqrt(2 * onp.pi), dtype=loc.dtype)
      values = tf.sigmoid(
          grid * scale[..., tf.newaxis] + loc[..., tf.newaxis]
      )
      return tf.reduce_sum(values * weights, axis=-1) / normalizer
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import sigmoid
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.math import special
label_desc: Use image node_id 9 for calling a global function with example usage: logit_normal_mean_gh(loc, scale, deg) and returns: unknown