def METHOD_NAME(self, results: List[Dict], action, batched_records):
    records_failed = 0
    records_processed = 0
    for i, result in enumerate(results):
        if result.get("success"):
            records_processed += 1
        else:
            records_failed += 1
            self.logger.error(
                f"Failed {action} to to {self.stream_name}. Error: {result.get('errors')}.\
                    Record {batched_records[i]}"
            )
    self.logger.info(
        f"{action} {records_processed}/{len(results)} to {self.stream_name}."
    )
    if records_failed > 0 and not self.config.get("allow_failures"):
        raise SalesforceApiError(
            f"{records_failed} error(s) in {action} batch commit to {self.stream_name}."
        )