def _get_filter_size(neighborhood_size, feature_size):
    """Returns number of elements in filter with size neighborhood_size."""
    return (neighborhood_size + 1)**(feature_size + 1) - neighborhood_size**(
        feature_size + 1)