code: def test_parallel():
      # Only relevant for 3d or 4d inputs
  
      # Make input data
      input_2d = image_gibbs.copy()
      input_3d = np.stack([input_2d, input_2d], axis=2)
      input_4d = np.stack([input_3d, input_3d], axis=3)
  
      # Test 3d case
      output_3d_parallel = gibbs_removal(
          input_3d, inplace=False, num_processes=2
      )
      output_3d_no_parallel = gibbs_removal(
          input_3d, inplace=False, num_processes=1
      )
      assert_array_almost_equal(
          output_3d_parallel, output_3d_no_parallel
      )
  
      # Test 4d case
      output_4d_parallel = gibbs_removal(
          input_4d, inplace=False, num_processes=2
      )
      output_4d_no_parallel = gibbs_removal(
          input_4d, inplace=False, num_processes=1
      )
      assert_array_almost_equal(
          output_4d_parallel, output_4d_no_parallel
      )
  
      # Test num_processes=None case
      output_4d_all_cpu = gibbs_removal(
          input_4d, inplace=False, num_processes=None
      )
      assert_array_almost_equal(
          output_4d_all_cpu, output_4d_no_parallel
      )
  
file_path: dipy/dipy/denoise/tests/test_gibbs.py
imports: import numpy
  from dipy.denoise.gibbs import _gibbs_removal_1d, _gibbs_removal_2d, gibbs_removal, _image_tv
  from numpy.testing import assert_, assert_array_almost_equal, assert_raises
label_desc: Use image node_id 2 for calling a global function with example usage: test_parallel() without return types