code: def test_penultimate(self, kernel):
      if kernel in [kernels.PeriodicBNN, kernels.MultiLayerBNN]:
          bnn = kernel(period=0.1, going_to_be_multiplied=True)
      else:
          bnn = kernel(going_to_be_multiplied=True)
      self.assertNotIn("dense2", bnn.distributions())
      params = bnn.init(jax.random.PRNGKey(0), jnp.zeros(5))
      lprior = bnn.log_prior(params)
      if kernel != kernels.MultiLayerBNN:
          self.assertLess(lprior, 0.0)
      h = bnn.apply(params, jnp.ones(5), method=bnn.penultimate)
      self.assertEqual((50,), h.shape)
  
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 4 for calling the KernelsTest obj's underlying member method code with example usage: obj.test_penultimate(kernel) without return types