def get_bytes_for_unpacked_spike_vector(slices):
    """Compute the number of bytes necessary to store the unpacked spike vector
    for the given ranges of neurons.
    """
    words = 0
    for neurons in slices:
        n_neurons = neurons.stop - neurons.start
        words += n_neurons // 32
        words += 1 if n_neurons % 32 else 0
    return words * 4
