'Turn a set of connections from backend object servers into a generator
that yields up the rebuilt fragment archive for frag_index.'

def make_rebuilt_fragment_iter(self, responses, path, policy, frag_index):

    def _get_one_fragment(resp):
        buff = ''
        remaining_bytes = policy.fragment_size
        while remaining_bytes:
            chunk = resp.read(remaining_bytes)
            if (not chunk):
                break
            remaining_bytes -= len(chunk)
            buff += chunk
        return buff
    def fragment_payload_iter():
        pile = GreenPile(len(responses))
        while True:
            for resp in responses:
                pile.spawn(_get_one_fragment, resp)
            try:
                with Timeout(self.node_timeout):
                    fragment_payload = [fragment for fragment in pile]
            except (Exception, Timeout):
                self.logger.exception(_('Error    trying    to    rebuild    %(path)s    policy#%(policy)d    frag#%(frag_index)s'), {'path': path, 'policy': policy, 'frag_index': frag_index})
                break
            if (not all(fragment_payload)):
                break
            rebuilt_fragment = self._reconstruct(policy, fragment_payload, frag_index)
            (yield rebuilt_fragment)
    return fragment_payload_iter()
