def replace_capacities(self, capacities, team_context, iteration_id):
        """ReplaceCapacities.
        Replace a team's capacity
        :param [TeamMemberCapacity] capacities: Team capacity to replace
        :param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
        :param str iteration_id: ID of the iteration
        :rtype: [TeamMemberCapacity]
        """
        project = None
        team = None
        if team_context is not None:
            if team_context.project_id:
                project = team_context.project_id
            else:
                project = team_context.project
            if team_context.team_id:
                team = team_context.team_id
            else:
                team = team_context.team

        route_values = {}
        if project is not None:
            route_values['project'] = self._serialize.url('project', project, 'string')
        if team is not None:
            route_values['team'] = self._serialize.url('team', team, 'string')
        if iteration_id is not None:
            route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str')
        content = self._serialize.body(capacities, '[TeamMemberCapacity]')
        response = self._send(http_method='PUT',
                              location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57',
                              version='5.0',
                              route_values=route_values,
                              content=content)
        return self._deserialize('[TeamMemberCapacity]', self._unwrap_collection(response))
ReplaceCapacities.
        Replace a team's capacity
        :param [TeamMemberCapacity] capacities: Team capacity to replace
        :param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
        :param str iteration_id: ID of the iteration
        :rtype: [TeamMemberCapacity]