@shared_task(bind=True)
def collect_ids(self, res, i):
 return (res, (self.request.root_id, self.request.parent_id, i))

@ shared_task ( bind = True ) def collect_ids ( self , res , i ) : return ( res , ( self . request . root_id , self . request . parent_id , i ) )
used as a callback in a chain or group where the previous tasks are :task:ids: returns a tuple of:: (previous_result .