code: def test_lnprob_and_grad_scalar():
      prior = HorseshoePrior(scale=1, seed=1)
  
      # Legal scalar
      assert prior.get_log_probability(-1) == 1.1450937952919953
      assert prior.get_gradient(-1) == -0.6089187456211098
  
      # Boundary
      assert np.isinf(prior._get_log_probability(0))
      assert np.isinf(prior._get_gradient(0))
  
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 7 for calling a global function with example usage: test_lnprob_and_grad_scalar() without return types