code: func updateIterationsWithCounts(wiCounts map[string]workitem.WICountsPerIteration) IterationConvertFunc {
  	return func(request *http.Request, itr *iteration.Iteration, appIteration *app.Iteration) {
  		var counts workitem.WICountsPerIteration
  		if _, ok := wiCounts[appIteration.ID.String()]; ok {
  			counts = wiCounts[appIteration.ID.String()]
  		} else {
  			counts = workitem.WICountsPerIteration{}
  		}
  		if appIteration.Relationships == nil {
  			appIteration.Relationships = &app.IterationRelations{}
  		}
  		if appIteration.Relationships.Workitems == nil {
  			appIteration.Relationships.Workitems = &app.RelationGeneric{}
  		}
  		if appIteration.Relationships.Workitems.Meta == nil {
  			appIteration.Relationships.Workitems.Meta = map[string]interface{}{}
  		}
  		appIteration.Relationships.Workitems.Meta[KeyTotalWorkItems] = counts.Total
  		appIteration.Relationships.Workitems.Meta[KeyClosedWorkItems] = counts.Closed
  	}
  }
docs: // updateIterationsWithCounts accepts map of 'iterationID to a workitem.WICountsPerIteration instance'.
  // This function returns function of type IterationConvertFunc
  // Inner function is able to access `wiCounts` in closure and it is responsible
  // for adding 'closed' and 'total' count of WI in relationship's meta for every given iteration.