docs: def _create_bvals(sorted_dicoms, bval_file):
      """
      Write the bvals from the sorted dicom files to a bval file
      """
      bvals = []
      for index in range(0, len(sorted_dicoms)):
          if type(sorted_dicoms[0]) is list:
              dicom_headers = sorted_dicoms[index][0]
          else:
              dicom_headers = sorted_dicoms[index]
  
          bvals.append(common.get_is_value(dicom_headers[Tag(0x0019, 0x100c)]))
      # save the found bvecs to the file
      common.write_bval_file(bvals, bval_file)
      return numpy.array(bvals)