def _check_and_set_fixed_length_window_arguments(
    start_offset_samples,
    stop_offset_samples,
    window_size_samples,
    window_stride_samples,
    drop_last_window,
    lazy_metadata,
):
    """Raises warnings for incorrect input arguments and will set correct default values for
    stop_offset_samples & drop_last_window, if necessary.
    """
    _check_windowing_arguments(
        start_offset_samples,
        stop_offset_samples,
        window_size_samples,
        window_stride_samples,
    )

    if stop_offset_samples == 0:
        warnings.warn(
            "Meaning of `trial_stop_offset_samples`=0 has changed, use `None` "
            "to indicate end of trial/recording. Using `None`."
        )
        stop_offset_samples = None

    if start_offset_samples != 0 or stop_offset_samples is not None:
        warnings.warn(
            "Usage of offset_sample args in create_fixed_length_windows is deprecated and"
            " will be removed in future versions. Please use "
            'braindecode.preprocessing.preprocess.Preprocessor("crop", tmin, tmax)'
            " instead."
        )

    if (
        window_size_samples is not None
        and window_stride_samples is not None
        and drop_last_window is None
    ):
        raise ValueError(
            "drop_last_window must be set if both window_size_samples &"
            " window_stride_samples have also been set"
        )
    elif (
        window_size_samples is None
        and window_stride_samples is None
        and drop_last_window is False
    ):
        # necessary for following assertion
        drop_last_window = None

    assert (
        (window_size_samples is None)
        == (window_stride_samples is None)
        == (drop_last_window is None)
    )
    if not drop_last_window and lazy_metadata:
        raise ValueError(
            "Cannot have drop_last_window=False and lazy_metadata=True at the same time."
        )
    return stop_offset_samples, drop_last_window
Raises warnings for incorrect input arguments and will set correct default values for
    stop_offset_samples & drop_last_window, if necessary.
    
braindecode/preprocessing/windowers.py