code: def test_sample_from_prior():
      prior = TophatPrior(
          lower_bound=np.exp(-10), upper_bound=np.exp(2), seed=1
      )
      samples = prior.sample_from_prior(10)
      np.testing.assert_array_equal(samples >= -10, True)
      np.testing.assert_array_equal(samples <= 2, True)
      # Test that the rng is set
      assert pytest.approx(samples[0]) == -4.995735943569112
  
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 5 for calling a global function with example usage: test_sample_from_prior() without return types