code: def test_forecast_csd():
      sphere = get_sphere("repulsion100")
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore",
              message=descoteaux07_legacy_msg,
              category=PendingDeprecationWarning,
          )
          fm = ForecastModel(
              data.gtab,
              dec_alg="CSD",
              sphere=data.sphere,
              lambda_csd=data.lambda_csd,
          )
      f_fit = fm.fit(data.S)
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore",
              message=descoteaux07_legacy_msg,
              category=PendingDeprecationWarning,
          )
          fodf_csd = f_fit.odf(sphere, clip_negative=False)
  
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore",
              message=descoteaux07_legacy_msg,
              category=PendingDeprecationWarning,
          )
          fm = ForecastModel(
              data.gtab,
              sh_order=data.sh_order,
              lambda_lb=data.lambda_lb,
              dec_alg="WLS",
          )
      f_fit = fm.fit(data.S)
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore",
              message=descoteaux07_legacy_msg,
              category=PendingDeprecationWarning,
          )
          fodf_wls = f_fit.odf(sphere, clip_negative=False)
  
      value = (
          fodf_wls[fodf_wls < 0].sum() < fodf_csd[fodf_csd < 0].sum()
      )
      assert_equal(value, 1)
  
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 3 for calling a global function with example usage: test_forecast_csd() without return types