def _get_bin_num(frequency, bin_size):
    
    """
    Gets the number of the frequency bin whose center is closest to
    the specified frequency.
    """
    
    return int(round(frequency / bin_size))