"""Core logic for aggregation and splitting operations."""