def METHOD_NAME(self, model, dataloader, curr_seq_length: int, truncate: bool, preserve_end_of_sequence: bool):
    model = model()
    dataloader = dataloader()
    state = State(
        model=model,
        rank_zero_seed=0,
        run_name='run_name',
        device=DeviceCPU(),
        dataloader=dataloader,
        dataloader_label='train',
        max_duration='1ep',
    )
    batch_before = next(iter(dataloader))
    batch_after = set_batch_sequence_length(deepcopy(batch_before), curr_seq_length, truncate,
                                            preserve_end_of_sequence)
    check_batch(batch_before, batch_after, curr_seq_length, truncate, preserve_end_of_sequence)
    check_forward_backward(state.model, batch_after)