code: def design_matrix(ubvals):
      """Constructs design matrix for the mean signal diffusion kurtosis model
  
      Parameters
      ----------
      ubvals : array
          Containing the unique b-values of the data.
  
      Returns
      -------
      design_matrix : array (nb, 3)
          Design matrix or B matrix for the mean signal diffusion kurtosis
          model assuming that parameters are in the following order:
          design_matrix[j, :] = (msd, msk, S0)
      """
      nb = ubvals.shape
      B = np.zeros(nb + (3,))
      B[:, 0] = -ubvals
      B[:, 1] = 1.0 / 6.0 * ubvals**2
      B[:, 2] = np.ones(nb)
      return B
  
imports: import numpy
  import scipy.optimize
  from dipy.core.gradients import check_multi_b, unique_bvals_magnitude, round_bvals
  from dipy.reconst.base import ReconstModel
  from dipy.reconst.dti import MIN_POSITIVE_SIGNAL
  from dipy.core.ndindex import ndindex
  from dipy.core.onetime import auto_attr
label_desc: Use image node_id 8 for calling a global function with example usage: design_matrix(ubvals) and returns: B