public CurrentAssignmentBuilder withCurrentPartitionEpoch(
        BiFunction<Uuid, Integer, Integer> currentPartitionEpoch
    ) {
        this.currentPartitionEpoch = Objects.requireNonNull(currentPartitionEpoch);
        return this;
    }
Sets a BiFunction which allows to retrieve the current epoch of a
partition. This is used by the state machine to determine if a
partition is free or still used by another member.

@param currentPartitionEpoch A BiFunction which gets the epoch of a
                             topic id / partitions id pair.
@return This object.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/consumer/CurrentAssignmentBuilder.java