code: def filter_analytic_scalar_likelihood(
      method_name: str,
  ) -> Sequence[LikelihoodSetup]:
      assert method_name in (
          "_variational_expectations",
          "_predict_log_density",
          "_predict_mean_and_var",
      )
  
      def is_analytic(likelihood: Likelihood) -> bool:
          assert not isinstance(likelihood, MonteCarloLikelihood)
          assert isinstance(likelihood, ScalarLikelihood)
          quadrature_fallback = getattr(ScalarLikelihood, method_name)
          actual_method = getattr(likelihood.__class__, method_name)
          return actual_method is not quadrature_fallback
  
      return [
          l
          for l in scalar_likelihood_setups
          if is_analytic(get_likelihood(l))
      ]
  
imports: from typing import Sequence, Tuple
  import numpy
  import pytest
  import tensorflow
  from numpy.testing import assert_allclose
  import gpflow
  import gpflow.ci_utils
  from gpflow.base import TensorType
  from gpflow.config import default_float, default_int
  from gpflow.likelihoods import HeteroskedasticTFPConditional, Likelihood, MonteCarloLikelihood, MultiLatentLikelihood, MultiLatentTFPConditional, QuadratureLikelihood, ScalarLikelihood, Bernoulli, Beta, Exponential, Gamma, Gaussian, GaussianMC, MultiClass, Ordinal, Poisson, StudentT
label_desc: Use image node_id 1 for calling a global function with example usage: filter_analytic_scalar_likelihood(method_name) and returns: unknown, unknown