def METHOD_NAME(next_start_bin, next_end_bin, norm_type):
    """
    Compute the quantization error if we use start_bin to end_bin as the
    min and max to do the quantization.
    """
    dst_bin_width = bin_width * (next_end_bin - next_start_bin + 1) / dst_nbins
    if dst_bin_width == 0.0:
        return 0.0
    src_bin = np.arange(bins)
    # distances from the beginning of first dst_bin to the beginning and
    # end of src_bin
    src_bin_begin = (src_bin - next_start_bin) * bin_width
    src_bin_end = src_bin_begin + bin_width
    # which dst_bins the beginning and end of src_bin belong to?
    dst_bin_of_begin = np.clip(src_bin_begin // dst_bin_width, 0, dst_nbins - 1)
    dst_bin_of_begin_center = (dst_bin_of_begin + 0.5) * dst_bin_width
    dst_bin_of_end = np.clip(src_bin_end // dst_bin_width, 0, dst_nbins - 1)
    dst_bin_of_end_center = (dst_bin_of_end + 0.5) * dst_bin_width
    density = histogram / bin_width
    norm = np.zeros(bins)
    delta_begin = src_bin_begin - dst_bin_of_begin_center
    delta_end = dst_bin_width / 2
    norm += _get_norm(delta_begin, delta_end, density, norm_type)
    norm += (dst_bin_of_end - dst_bin_of_begin - 1) * _get_norm(
        -dst_bin_width / 2, dst_bin_width / 2, density, norm_type
    )
    dst_bin_of_end_center = dst_bin_of_end * dst_bin_width + dst_bin_width / 2
    delta_begin = -dst_bin_width / 2
    delta_end = src_bin_end - dst_bin_of_end_center
    norm += _get_norm(delta_begin, delta_end, density, norm_type)
    return np.sum(norm)