def packed_drop_first(sequences, batch_sizes):
    """
    Drops the first item of each sequence in the given data according to the given batch sizes.

    Parameters
    ----------
    sequences: torch.Tensor [N, ...]
        The data tensor of the packed sequences (number of total elements N).
    batch_sizes: torch.Tensor [B]
        The batch sizes (maximum sequence length B).

    Returns
    -------
    torch.Tensor [N - S, ...]
        The data of the packed sequences where each sequence's first element has been dropped
        (number of sequences S).
    """
    num_sequences = batch_sizes[0].item()
    return sequences[num_sequences:]
