public R apply(ProcessingContext<T> context, R record) {
        if (transformationStages.isEmpty()) return record;

        for (final TransformationStage<R> transformationStage : transformationStages) {
            final R current = record;

            log.trace("Applying transformation {} to {}",
                transformationStage.transformClass().getName(), record);
            // execute the operation
            record = retryWithToleranceOperator.execute(context, () -> transformationStage.apply(current), Stage.TRANSFORMATION, transformationStage.transformClass());

            if (record == null) break;
        }

        return record;
    }
Represents a chain of {@link Transformation}s to be applied to a {@link ConnectRecord} serially.
@param <T> The type of record included in the {@link ProcessingContext} associated with each record
@param <R> The type of record (must be an implementation of {@link ConnectRecord})
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/TransformationChain.java