Topological and network dynamics reveal state transitions in honeybee bee-ball formation