List<EpochEntry> getLeaderEpochEntries(UnifiedLog log, long startOffset, long endOffset) {
        if (log.leaderEpochCache().isDefined()) {
            return log.leaderEpochCache().get().epochEntriesInRange(startOffset, endOffset);
        } else {
            return Collections.emptyList();
        }
    }
Returns the leader epoch entries within the range of the given start[exclusive] and end[inclusive] offset.
<p>
Visible for testing.

@param log         The actual log from where to take the leader-epoch checkpoint
@param startOffset The start offset of the epoch entries (inclusive).
                   If start offset is 6, then it will retain an entry at offset 6.
@param endOffset   The end offset of the epoch entries (exclusive)
                   If end offset is 100, then it will remove the entries greater than or equal to 100.
@return the leader epoch entries
core/src/main/java/kafka/log/remote/RemoteLogManager.java