def _check_num_frames(video_results, num_frame):
    """Check if the video lengths match the given number of frames."""
    if video_results['num_frames'] != num_frame:
        return False
    if 'bbox' in video_results and len(video_results['bbox']) != num_frame:
        return False
    for video in video_results['video']:
        if video.shape[0] != num_frame:
            return False
    return True