code: def _check(params: Iterable[Any], nghp: Optional[int] = None) -> None:
      analytic = expectation(*params)
      quad = quadrature_expectation(*params, nghp=nghp)  # type: ignore[misc]
      assert_allclose(analytic, quad, rtol=RTOL)
  
imports: from typing import Any, Callable, Iterable, Mapping, Optional, Sequence
  import numpy
  import pytest
  import tensorflow
  from numpy.testing import assert_allclose
  from tensorflow import convert_to_tensor
  import gpflow
  import gpflow.inducing_variables
  import gpflow.kernels
  from gpflow import mean_functions
  from gpflow.base import AnyNDArray
  from gpflow.config import default_float
  from gpflow.expectations import expectation, quadrature_expectation
  from gpflow.probability_distributions import DiagonalGaussian, Gaussian, MarkovGaussian, ProbabilityDistribution
label_desc: Use image node_id 6 for calling a global function with example usage: _check(params, nghp) without return types