code: def test_inplace():
      # 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 2d cases
      output_2d = gibbs_removal(input_2d, inplace=False)
      assert_raises(
          AssertionError, assert_array_almost_equal, input_2d, output_2d
      )
  
      output_2d = gibbs_removal(input_2d, inplace=True)
      assert_array_almost_equal(input_2d, output_2d)
  
      # Test 3d case
      output_3d = gibbs_removal(input_3d, inplace=False)
      assert_raises(
          AssertionError, assert_array_almost_equal, input_3d, output_3d
      )
  
      output_3d = gibbs_removal(input_3d, inplace=True)
      assert_array_almost_equal(input_3d, output_3d)
  
      # Test 4d case
      output_4d = gibbs_removal(input_4d, inplace=False)
      assert_raises(
          AssertionError, assert_array_almost_equal, input_4d, output_4d
      )
  
      output_4d = gibbs_removal(input_4d, inplace=True)
      assert_array_almost_equal(input_4d, output_4d)
  
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 3 for calling a global function with example usage: test_inplace() without return types