code: def test_joint_hist_eval():
      I = make_xyz_image(make_data_int16(), dummy_affine, "scanner")
      J = make_xyz_image(I.get_fdata().copy(), dummy_affine, "scanner")
      # Obviously the data should be the same
      assert_array_equal(I.get_fdata(), J.get_fdata())
      # Instantiate default thing
      R = HistogramRegistration(I, J)
      R.similarity = "cc"
      null_affine = Affine()
      val = R.eval(null_affine)
      assert_almost_equal(val, 1.0)
      # Try with what should be identity
      R.subsample(spacing=[1, 1, 1])
      assert_array_equal(R._from_data.shape, I.shape)
      val = R.eval(null_affine)
      assert_almost_equal(val, 1.0)
  
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 24 for calling a global function with example usage: test_joint_hist_eval() without return types