docs: private SegmentIdWithShardSpec getAppendableSegment(final DateTime timestamp, final String sequenceName)
    {
      synchronized (segments) {
        final SegmentsForSequence segmentsForSequence = segments.get(sequenceName);
  
        if (segmentsForSequence == null) {
          return null;
        }
  
        final Map.Entry<Long, SegmentsOfInterval> candidateEntry = segmentsForSequence.floor(
            timestamp.getMillis()
        );
  
        if (candidateEntry != null) {
          final SegmentsOfInterval segmentsOfInterval = candidateEntry.getValue();
          if (segmentsOfInterval.interval.contains(timestamp)) {
            return segmentsOfInterval.appendingSegment == null ?
                   null :
                   segmentsOfInterval.appendingSegment.getSegmentIdentifier();
          } else {
            return null;
          }
        } else {
          return null;
        }
      }
    }