code: def test_smoothing():
      """Test smoothing the `to` image."""
      I = make_xyz_image(
          make_data_int16(dx=100, dy=100, dz=50),
          dummy_affine,
          "scanner",
      )
      T = Rigid()
      R = HistogramRegistration(I, I)
      R1 = HistogramRegistration(I, I, smooth=1)
      s = R.eval(T)
      s1 = R1.eval(T)
      assert_almost_equal(s, 1)
      assert s1 < s
      pytest.raises(ValueError, HistogramRegistration, I, I, smooth=-1)
  
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 31 for calling a global function with example usage: test_smoothing() without return types