code: def test_lnprob():
      prior = SoftTopHatPrior(
          lower_bound=np.exp(-5),
          upper_bound=np.exp(5),
          exponent=2,
          seed=1,
      )
  
      # Legal values
      assert prior.get_log_probability(-5) == 0
      assert prior.get_log_probability(0) == 0
      assert prior.get_log_probability(5) == 0
  
      # Illegal values
      assert pytest.approx(prior.get_log_probability(-5.1)) == -0.01
      assert pytest.approx(prior.get_log_probability(-6)) == -1
      assert pytest.approx(prior.get_log_probability(-7)) == -4
      assert pytest.approx(prior.get_log_probability(5.1)) == -0.01
      assert pytest.approx(prior.get_log_probability(6)) == -1
      assert pytest.approx(prior.get_log_probability(7)) == -4
  
imports: from functools import partial
  import numpy
  import pytest
  import scipy.optimize
  from smac.constants import VERY_SMALL_NUMBER
  from smac.model.gaussian_process.priors import GammaPrior, HorseshoePrior, LogNormalPrior, SoftTopHatPrior, TophatPrior
label_desc: Use image node_id 15 for calling a global function with example usage: test_lnprob() without return types