def METHOD_NAME(self, epoch_frac: float, X: torch.Tensor, y: torch.Tensor, pr_algorithm: ProgressiveResizing,
               minimal_state: State, empty_logger: Logger):
    """Test apply at different epoch fractions (fraction of max epochs)"""
    assert minimal_state.max_duration is not None
    assert minimal_state.max_duration.unit == TimeUnit.EPOCH
    minimal_state.timestamp.epoch._value = int(epoch_frac * minimal_state.max_duration.value)
    s = pr_algorithm.initial_scale
    f = pr_algorithm.finetune_fraction
    d = pr_algorithm.delay_fraction
    p = pr_algorithm.size_increment
    if epoch_frac >= d:
        scale_factor_elapsed = min([(epoch_frac - d) / (1 - f - d), 1.0])
    else:
        scale_factor_elapsed = 0.0
    scale_factor = s + (1 - s) * scale_factor_elapsed
    minimal_state.batch = (X, y)
    width = X.shape[3]
    scaled_width_pinned = round(width * scale_factor / p) * p
    scale_factor_pinned = scaled_width_pinned / width
    pr_algorithm.apply(Event.AFTER_DATALOADER, minimal_state, empty_logger)
    last_input, _ = minimal_state.batch
    assert check_scaled_shape(X, last_input, scale_factor_pinned)