import random


def get_random_block_from_data(data, batch_size):
    """Randomly select batch_size number of contiguous samples."""
    start_index = random.randint(0, data.shape[0] - batch_size)
    return data[start_index:(start_index + batch_size)]