def METHOD_NAME(poses):
    sumweight = 0.0
    sumweightsq = 0.0
    for pos in poses:
        sumweight += pos["weight"]
        sumweightsq += pos["weight"] * pos["weight"]
    return (sumweight, sumweightsq)