code: func (r *Orchestrator) updatableAndDeadSlots(ctx context.Context, service *api.Service) (map[uint64]orchestrator.Slot, map[uint64]orchestrator.Slot, error) {
  	var (
  		tasks []*api.Task
  		err   error
  	)
  	r.store.View(func(tx store.ReadTx) {
  		tasks, err = store.FindTasks(tx, store.ByServiceID(service.ID))
  	})
  	if err != nil {
  		return nil, nil, err
  	}
  
  	updatableSlots := make(map[uint64]orchestrator.Slot)
  	for _, t := range tasks {
  		updatableSlots[t.Slot] = append(updatableSlots[t.Slot], t)
  	}
  
  	deadSlots := make(map[uint64]orchestrator.Slot)
  	for slotID, slot := range updatableSlots {
  		updatable := r.restarts.UpdatableTasksInSlot(ctx, slot, service)
  		if len(updatable) != 0 {
  			updatableSlots[slotID] = updatable
  		} else {
  			delete(updatableSlots, slotID)
  			deadSlots[slotID] = slot
  		}
  	}
  
  	return updatableSlots, deadSlots, nil
  }
docs: // updatableAndDeadSlots returns two maps of slots. The first contains slots
  // that have at least one task with a desired state above NEW and lesser or
  // equal to RUNNING, or a task that shouldn't be restarted. The second contains
  // all other slots with at least one task.