code: func translateToTaskGroups(stepId2StepGroup []*StepGroup) (ret []*TaskGroup) {
  	for _, stepGroup := range stepId2StepGroup {
  		assertSameNumberOfTasks(stepGroup.Steps)
  		count := len(stepGroup.Steps[0].Tasks)
  		// println("dealing with", stepGroup.Steps[0].Name, "tasks:", len(stepGroup.Steps[0].Tasks))
  		for i := 0; i < count; i++ {
  			tg := NewTaskGroup()
  			for _, step := range stepGroup.Steps {
  				tg.AddTask(step.Tasks[i])
  			}
  			// depends on the previous step group
  			// MAYBE IMPROVEMENT: depends on a subset of previus shards
  			tg.ParentStepGroup = stepGroup
  			stepGroup.TaskGroups = append(stepGroup.TaskGroups, tg)
  			tg.Id = len(ret)
  			ret = append(ret, tg)
  		}
  	}
  	return
  }
docs: // group local tasks into one task group