docs: def _create_bvals_bvecs(grouped_dicoms, bval_file, bvec_file):
      """
      Write the bvals from the sorted dicom files to a bval file
      """
  
      # get the bvals and bvecs
      bvals, bvecs = _get_bvals_bvecs(grouped_dicoms)
  
      # save the found bvecs to the file
      common.write_bval_file(bvals, bval_file)
      common.write_bvec_file(bvecs, bvec_file)
  
      return bvals, bvecs