code: def test_ivim_errors():
      """
      Test if errors raised in the module are working correctly.
  
      Scipy introduced bounded least squares fitting in the version 0.17
      and is not supported by the older versions. Initializing an IvimModel
      with bounds for older Scipy versions should raise an error.
      """
      ivim_model_trr = IvimModel(
          gtab,
          bounds=([0.0, 0.0, 0.0, 0.0], [np.inf, 1.0, 1.0, 1.0]),
          fit_method="trr",
      )
      ivim_fit = ivim_model_trr.fit(data_multi)
      est_signal = ivim_fit.predict(gtab, S0=1.0)
      assert_array_equal(est_signal.shape, data_multi.shape)
      assert_array_almost_equal(ivim_fit.model_params, ivim_params_trr)
      assert_array_almost_equal(est_signal, data_multi)
  
imports: import warnings
  import numpy
  from numpy.testing import assert_array_equal, assert_array_almost_equal, assert_raises, assert_array_less, assert_, assert_equal
  from dipy.testing import assert_greater_equal
  import pytest
  from dipy.reconst.ivim import ivim_prediction, IvimModel
  from dipy.core.gradients import gradient_table, generate_bvecs
  from dipy.sims.voxel import multi_tensor
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 5 for calling a global function with example usage: test_ivim_errors() without return types