import torch


def selectFramesRandomly(N, k):
    """
    N - total number of frames
    k - number to choose
    """
    frame_ids = torch.multinomial(torch.ones(N), k)
    frame_ids, _ = torch.sort(frame_ids)
    return frame_ids