import random


def get_sampled_frame_number(total_frame_number: int, sample_rate: int):
    """
    Sample frame numbers randomly according to the sample rate.

    :param total_frame_number: total frame number of target video
    :param sample_rate: sampling rate for frame
    :return: list of sampled frame number
    """
    frame_number_list = []

    # sample target frame number
    start_idx = 0
    for start_idx in range(1, total_frame_number, sample_rate):
        end_idx = start_idx + sample_rate
        sampled_frame_number = random.randint(start_idx, end_idx)
        frame_number_list.append(sampled_frame_number)

    return frame_number_list