'Store an erasure coded object.'

def _store_object(self, req, data_source, nodes, partition, outgoing_headers):

    policy_index = int(req.headers.get('X-Backend-Storage-Policy-Index'))
    policy = POLICIES.get_by_index(policy_index)
    expected_frag_size = None
    if req.content_length:
        num_fragments = (req.content_length // policy.ec_segment_size)
        expected_frag_size = (policy.fragment_size * num_fragments)
        last_segment_size = (req.content_length % policy.ec_segment_size)
        if last_segment_size:
            last_info = policy.pyeclib_driver.get_segment_info(last_segment_size, policy.ec_segment_size)
            expected_frag_size += last_info['fragment_size']
    for headers in outgoing_headers:
        headers['X-Backend-Obj-Content-Length'] = expected_frag_size
        headers.pop('Content-Length', None)
        headers.pop('Etag', None)
    etag_hasher = md5()
    min_conns = policy.quorum
    putters = self._get_put_connections(req, nodes, partition, outgoing_headers, policy)
    try:
        self._check_failure_put_connections(putters, req, min_conns)
        self._transfer_data(req, policy, data_source, putters, nodes, min_conns, etag_hasher)
        (statuses, reasons, bodies, _etags) = self._get_put_responses(req, putters, len(nodes), final_phase=True, min_responses=min_conns)
    except HTTPException as resp:
        return resp
    finally:
        for putter in putters:
            putter.close()
    etag = etag_hasher.hexdigest()
    resp = self.best_response(req, statuses, reasons, bodies, _('Object    PUT'), etag=etag, quorum_size=min_conns)
    resp.last_modified = math.ceil(float(Timestamp(req.headers['X-Timestamp'])))
    return resp
