code: def test_decompose_tensor_nan():
      D_fine = np.array([1.7e-3, 0.0, 0.3e-3, 0.0, 0.0, 0.2e-3])
      D_alter = np.array([1.6e-3, 0.0, 0.4e-3, 0.0, 0.0, 0.3e-3])
      D_nan = np.nan * np.ones(6)
  
      lref, vref = decompose_tensor(from_lower_triangular(D_fine))
      lfine, vfine = _decompose_tensor_nan(
          from_lower_triangular(D_fine), from_lower_triangular(D_alter)
      )
      npt.assert_array_almost_equal(
          lfine, np.array([1.7e-3, 0.3e-3, 0.2e-3])
      )
      npt.assert_array_almost_equal(vfine, vref)
  
      lref, vref = decompose_tensor(from_lower_triangular(D_alter))
      lalter, valter = _decompose_tensor_nan(
          from_lower_triangular(D_nan), from_lower_triangular(D_alter)
      )
      npt.assert_array_almost_equal(
          lalter, np.array([1.6e-3, 0.4e-3, 0.3e-3])
      )
      npt.assert_array_almost_equal(valter, vref)
  
imports: import warnings
  import numpy
  import numpy.testing
  import scipy.optimize
  import dipy.reconst.dti
  from dipy.io.gradients import read_bvals_bvecs
  from dipy.reconst.dti import ols_resort_msg, axial_diffusivity, color_fa, fractional_anisotropy, from_lower_triangular, geodesic_anisotropy, lower_triangular, mean_diffusivity, radial_diffusivity, TensorModel, trace, linearity, planarity, sphericity, decompose_tensor, _decompose_tensor_nan
  from dipy.io.image import load_nifti_data
  from dipy.data import get_fnames, dsi_voxels, get_sphere
  from dipy.core.subdivide_octahedron import create_unit_sphere
  import dipy.core.gradients
  import dipy.core.sphere
  from dipy.sims.voxel import single_tensor
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 25 for calling a global function with example usage: test_decompose_tensor_nan() without return types