code: def _chain_indices(self):
          
          chain_indices = deque(range(len(self.connection_chains)))
          chain_indices.rotate(self._last_chain_index)
          return chain_indices
docs: Get the deque of chain indices starting with last successful index.