code: def _remove_subsequent_result_because_of_batch_failure(self, sig):
          
  
          batch = self._batches_by_txn_id[sig]
          seen = []
          for txn in batch.transactions:
              txn_id = txn.header_signature
              for poss_successor in self._scheduled.copy():
                  if not self.is_transaction_in_schedule(poss_successor):
                      continue
  
                  if self._is_txn_to_replay(txn_id, poss_successor, seen):
                      if self._txn_has_result(poss_successor):
                          del self._txn_results[poss_successor]
                          self._scheduled.remove(poss_successor)
                          self._txns_available[poss_successor] = \
                              self._transactions[poss_successor]
                      else:
                          self._outstanding.add(poss_successor)
                      seen.append(poss_successor)
docs: Remove transactions from scheduled and txn_results for
          successors of txns in a failed batch. These transactions will now,
          or in the future be rescheduled in next_transaction; giving a
          replay ability.
  
          Args:
              sig (str): Transaction header signature