code: def test_supervised_likelihood_ratio():
      I = make_xyz_image(make_data_int16(), dummy_affine, "scanner")
      J = make_xyz_image(make_data_int16(), dummy_affine, "scanner")
      R = HistogramRegistration(
          I, J, similarity="slr", dist=np.ones((256, 256)) / (256**2)
      )
      assert_almost_equal(R.eval(Affine()), 0.0)
      pytest.raises(
          ValueError,
          HistogramRegistration,
          I,
          J,
          similarity="slr",
          dist=None,
      )
      pytest.raises(
          ValueError,
          HistogramRegistration,
          I,
          J,
          similarity="slr",
          dist=np.random.rand(100, 127),
      )
  
imports: import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from ....core.image.image_spaces import make_xyz_image
  from ....testing import assert_almost_equal
  from .._registration import _joint_histogram
  from ..affine import Affine, Rigid
  from ..histogram_registration import HistogramRegistration
label_desc: Use image node_id 19 for calling a global function with example usage: test_supervised_likelihood_ratio() without return types