code: def test_multivox_forecast():
      gtab = get_3shell_gtab()
      mevals = np.array(
          ([0.0017, 0.0003, 0.0003], [0.0017, 0.0003, 0.0003])
      )
  
      angl1 = [(0, 0), (60, 0)]
      angl2 = [(90, 0), (45, 90)]
      angl3 = [(0, 0), (90, 0)]
  
      S = np.zeros((3, 1, 1, len(gtab.bvals)))
      S[0, 0, 0], _ = multi_tensor(
          gtab,
          mevals,
          S0=1.0,
          angles=angl1,
          fractions=[50, 50],
          snr=None,
      )
      S[1, 0, 0], _ = multi_tensor(
          gtab,
          mevals,
          S0=1.0,
          angles=angl2,
          fractions=[50, 50],
          snr=None,
      )
      S[2, 0, 0], _ = multi_tensor(
          gtab,
          mevals,
          S0=1.0,
          angles=angl3,
          fractions=[50, 50],
          snr=None,
      )
  
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore",
              message=descoteaux07_legacy_msg,
              category=PendingDeprecationWarning,
          )
          fm = ForecastModel(gtab, sh_order=8, dec_alg="CSD")
      f_fit = fm.fit(S)
  
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore",
              message=descoteaux07_legacy_msg,
              category=PendingDeprecationWarning,
          )
          S_predict = f_fit.predict()
  
      assert_equal(S_predict.shape, S.shape)
  
      mse1 = np.sum((S_predict[0, 0, 0] - S[0, 0, 0]) ** 2) / len(
          gtab.bvals
      )
      assert_almost_equal(mse1, 0.0, 3)
  
      mse2 = np.sum((S_predict[1, 0, 0] - S[1, 0, 0]) ** 2) / len(
          gtab.bvals
      )
      assert_almost_equal(mse2, 0.0, 3)
  
      mse3 = np.sum((S_predict[2, 0, 0] - S[2, 0, 0]) ** 2) / len(
          gtab.bvals
      )
      assert_almost_equal(mse3, 0.0, 3)
  
file_path: dipy/dipy/reconst/tests/test_forecast.py
imports: import warnings
  import numpy
  from dipy.data import get_sphere, default_sphere, get_3shell_gtab
  from dipy.reconst.forecast import ForecastModel
  from dipy.reconst.shm import descoteaux07_legacy_msg
  from dipy.sims.voxel import multi_tensor
  from numpy.testing import assert_almost_equal, assert_equal
  import pytest
  from dipy.direction.peaks import peak_directions
  from dipy.core.sphere_stats import angular_similarity
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 7 for calling a global function with example usage: test_multivox_forecast() without return types