code: def test_fit_object():
      """
      Test the method of IvimFit class
      """
      assert_raises(
          IndexError, ivim_fit_single.__getitem__, (-0.1, 0, 0)
      )
      # Check if the S0 called is matching
      assert_array_almost_equal(
          ivim_fit_single.__getitem__(0).model_params, 1000.0
      )
  
      ivim_fit_multi = ivim_model_trr.fit(data_multi)
      # Should raise a TypeError if the arguments are not passed as tuple
      assert_raises(TypeError, ivim_fit_multi.__getitem__, -0.1, 0)
      # Should return IndexError if invalid indices are passed
      assert_raises(IndexError, ivim_fit_multi.__getitem__, (100, -0))
      assert_raises(
          IndexError, ivim_fit_multi.__getitem__, (100, -0, 2)
      )
      assert_raises(IndexError, ivim_fit_multi.__getitem__, (-100, 0))
      assert_raises(IndexError, ivim_fit_multi.__getitem__, [-100, 0])
      assert_raises(
          IndexError, ivim_fit_multi.__getitem__, (1, 0, 0, 3, 4)
      )
      # Check if the get item returns the S0 value for voxel (1,0,0)
      assert_array_almost_equal(
          ivim_fit_multi.__getitem__((1, 0, 0)).model_params[0],
          data_multi[1, 0, 0][0],
      )
  
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 11 for calling a global function with example usage: test_fit_object() without return types