class_docstr: Egocentric video classification frame-based dataset for
  `DoMSEV <https://www.verlab.dcc.ufmg.br/semantic-hyperlapse/cvpr2018-dataset/>`_
  
  This dataset handles the loading, decoding, and configurable sampling for
  the image frames.
class_docstr_tok: ["Egocentric","video","classification","frame-based","dataset","for","`","DoMSEV","<","https",":","\/\/www.verlab.dcc.ufmg.br\/semantic-hyperlapse\/cvpr2018-dataset\/",">","`","_","This","dataset","handles","the","loading",",","decoding",",","and","configurable","sampling","for","the","image","frames","."]
docstr: Args:
      frames_dict: The mapping of <frame_id, ImageFrameInfo> for all the frames
          in the dataset.
      video_labels: The list of temporal labels for each video
  
  Also unpacks one label per frame.
  Also converts them to class IDs and then a tensor.
docstr_tok: ["Args",":","frames_dict",":","The","mapping","of","<","frame_id",",","ImageFrameInfo",">","for","all","the","frames","in","the","dataset",".","video_labels",":","The","list","of","temporal","labels","for","each","video","Also","unpacks","one","label","per","frame",".","Also","converts","them","to","class","IDs","and","then","a","tensor","."]
code: def _assign_labels_to_frames(
      frames_dict: Dict[str, ImageFrameInfo],
      video_labels: Dict[str, List[LabelData]],
  ):
      """
      Args:
          frames_dict: The mapping of <frame_id, ImageFrameInfo> for all the frames
              in the dataset.
          video_labels: The list of temporal labels for each video
  
      Also unpacks one label per frame.
      Also converts them to class IDs and then a tensor.
      """
      labels_per_frame: Dict[str, int] = {}
      for frame_id, image_info in frames_dict.items():
          # Filter labels by only the ones that appear within the clip boundaries,
          # and unpack the labels so there is one per frame in the clip
          labels_in_video = video_labels[image_info.video_id]
          for label in labels_in_video:
              if (image_info.frame_number >= label.start_frame) and (
                  image_info.frame_number <= label.stop_frame
              ):
                  labels_per_frame[frame_id] = label.label_id
  
      return labels_per_frame
  
imports: import logging
  import math
  import random
  import time
  from dataclasses import dataclass
  from enum import Enum
  from typing import Any, Callable, Dict, List, Optional, Tuple
  import numpy
  import torch
  from iopath.common.file_io import g_pathmgr
  from PIL import Image
  from pytorchvideo.data.dataset_manifest_utils import ImageDataset, ImageFrameInfo, VideoClipInfo, VideoDataset, VideoDatasetType
  from pytorchvideo.data.utils import DataclassFieldCaster, load_dataclass_dict_from_csv
  from pytorchvideo.data.video import Video
label_desc: Use image node_id 2 for calling the DomsevFrameDataset obj's underlying member method code with example usage: obj._assign_labels_to_frames(frames_dict, video_labels) and returns: labels_per_frame