A connection between cellularization for groups and spaces via two-complexes