def __init__(self, costs):
        assert isinstance(costs, list)
        assert len(costs) > 0

        self.costs = []
        self.coeffs = []

        for cost in costs:
            if isinstance(cost, (list, tuple)):
                coeff, cost = cost
            else:
                coeff = 1.
            self.coeffs.append(coeff)
            self.costs.append(cost)

            if not isinstance(cost, Cost):
                raise ValueError("one of the costs is not "
                                 "Cost instance")

        # TODO: remove this when it is no longer necessary
        self.supervised = any([cost_.supervised for cost_ in self.costs])
L{CooperativeTask.resume} should raise a L{TaskNotPaused} exception if
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/costs/cost.py/SumOfCosts.__init__--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/test/test_cooperator.py/RunStateTests.test_resumeNotPaused