code: def test_likelihood(self, kernel):
      if kernel in [kernels.PeriodicBNN, kernels.MultiLayerBNN]:
          bnn = kernel(period=0.1)
      else:
          bnn = kernel()
      params = bnn.init(jax.random.PRNGKey(1), jnp.zeros(1))
      data = jnp.array(
          [[0], [1], [2], [3], [4], [5]], dtype=jnp.float32
      )
      obs = jnp.array([1, 0, 1, 0, 1, 0], dtype=jnp.float32)
      ll = bnn.log_likelihood(params, data, obs)
      lp = bnn.log_prob(params, data, obs)
      # We are mostly just testing that ll and lp are both float-ish numbers
      # than can be compared.  In general, there is no reason to expect that
      # lp < ll because there is no reason to expect in general that the
      # log_prior will be negative.
      if kernel == kernels.MultiLayerBNN:
          self.assertLess(ll, lp)
      else:
          self.assertLess(lp, ll)
  
imports: from absl.testing import parameterized
  import jax
  import jax.numpy
  import numpy
  from tensorflow_probability.python.experimental.autobnn import kernels
  from tensorflow_probability.python.experimental.autobnn import util
  from tensorflow_probability.substrates.jax.distributions import lognormal
  from absl.testing import absltest
label_desc: Use image node_id 2 for calling the KernelsTest obj's underlying member method code with example usage: obj.test_likelihood(kernel) without return types