def METHOD_NAME(source, source_lengths, start, step):
    """Source is 3D tensor, shaped (batch_size, timesteps, n_dimensions), assuming static sequence length"""
    # Compute the lengths of the sequences (-1 due to the last element being used as target but not as data!
    trunc_seq_len = int(source_lengths[0].item() - 1)
    lengths = torch.zeros(source.shape[0]).fill_(trunc_seq_len).to(source.device)
    # This is necessary for MultiHeadedAttention to work
    end = min(start + step, trunc_seq_len)
    data = source[:, start:end, :]
    target = source[:, start + 1:end + 1, :]
    return data, target, lengths