code: def test_joint_hist_raw():
      # Set up call to joint histogram
      jh_arr = np.zeros((10, 10), dtype=np.double)
      data_shape = (2, 3, 4)
      data = np.random.randint(size=data_shape, low=0, high=10).astype(
          np.short
      )
      data2 = np.zeros(np.array(data_shape) + 2, dtype=np.short)
      data2[:] = -1
      data2[1:-1, 1:-1, 1:-1] = data.copy()
      vox_coords = np.indices(data_shape).transpose((1, 2, 3, 0))
      vox_coords = np.ascontiguousarray(vox_coords.astype(np.double))
      _joint_histogram(jh_arr, data.flat, data2, vox_coords, 0)
      assert_almost_equal(np.diag(np.diag(jh_arr)), jh_arr)
  
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 25 for calling a global function with example usage: test_joint_hist_raw() without return types