import tensorflow as tf

    """
    # This assert should be only used with an instance that commutes with sum.
    assert stage.commutes_with_sum

    num_summands = len(server_test_data)
    expected_sum = np.sum([d.decoded_x for d in server_test_data], axis=0)
    sum_encoded_x = {}
    for k in server_test_data[0].encoded_x:
      sum_encoded_x[k] = np.sum([d.encoded_x[k] for d in server_test_data],
                                axis=0)
    with tf.Graph().as_default():
      with self.session() as sess:
        decode_sum_encoded_x = sess.run(
            stage.decode(sum_encoded_x, decode_params, num_summands, shape))
    self.assertAllClose(
        expected_sum,
        decode_sum_encoded_x,
        rtol=DEFAULT_RTOL,
        atol=DEFAULT_ATOL)

