fn inclusive_start_end<T: Idx>( range: impl RangeBounds<T>, domain: usize, ) -> Option<(usize, usize)>