code: def test_design_matrix():
      """Test QTI design matrix calculation."""
      btens = np.array([np.eye(3, 3) for i in range(3)])
      btens[0, 1, 1] = 0
      btens[0, 2, 2] = 0
      btens[1, 0, 0] = 0
      X = qti.design_matrix(btens)
      npt.assert_almost_equal(
          X,
          np.array(
              [
                  [1.0, 1.0, 1.0],
                  [-1.0, -0.0, -1.0],
                  [-0.0, -1.0, -1.0],
                  [-0.0, -1.0, -1.0],
                  [-0.0, -0.0, -0.0],
                  [-0.0, -0.0, -0.0],
                  [-0.0, -0.0, -0.0],
                  [0.5, 0.0, 0.5],
                  [0.0, 0.5, 0.5],
                  [0.0, 0.5, 0.5],
                  [0.0, 0.70710678, 0.70710678],
                  [0.0, 0.0, 0.70710678],
                  [0.0, 0.0, 0.70710678],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0],
              ]
          ).T,
      )
  
imports: import numpy
  import numpy.testing
  import dipy.reconst.qti
  from dipy.core.gradients import gradient_table
  from dipy.sims.voxel import vec2vec_rotmat
  from dipy.core.sphere import disperse_charges, HemiSphere
  from dipy.reconst.dti import fractional_anisotropy
  from dipy.testing.decorators import set_random_number_generator
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 12 for calling a global function with example usage: test_design_matrix() without return types