code: def _load_videos(
      video_data_manifest_file_path: Optional[str],
      video_info_file_path: str,
      multithreaded_io: bool,
      dataset_type: VideoDatasetType,
  ) -> Dict[str, Video]:
      video_infos: Dict[str, VideoInfo] = load_dataclass_dict_from_csv(
          video_info_file_path, VideoInfo, "video_id"
      )
      if dataset_type == VideoDatasetType.Frame:
          return VideoDataset._load_frame_videos(
              video_data_manifest_file_path,
              video_infos,
              multithreaded_io,
          )
      elif dataset_type == VideoDatasetType.EncodedVideo:
          return VideoDataset._load_encoded_videos(
              video_data_manifest_file_path, video_infos
          )
  
imports: import datetime
  import os
  from dataclasses import dataclass
  from enum import Enum
  from typing import Dict, Optional, Union
  from pytorchvideo.data.encoded_video import EncodedVideo
  from pytorchvideo.data.frame_video import FrameVideo
  from pytorchvideo.data.utils import DataclassFieldCaster, load_dataclass_dict_from_csv, save_dataclass_objs_to_headered_csv
  from pytorchvideo.data.video import Video
label_desc: Use image node_id 1 for calling the VideoDataset obj's underlying member method code with example usage: obj._load_videos(video_data_manifest_file_path, video_info_file_path, multithreaded_io, dataset_type) and returns: VideoDataset, VideoDataset