code: def get_flat_video_frames(directory, file_extension):
      frame_file_stem = "frame_"
      return {
          MOCK_VIDEO_IDS[0]: VideoFrameInfo(
              video_id=MOCK_VIDEO_IDS[0],
              location=f"{directory}/{MOCK_VIDEO_IDS[0]}",
              frame_file_stem=frame_file_stem,
              frame_string_length=16,
              min_frame_number=1,
              max_frame_number=3000,
              file_extension=file_extension,
          ),
          MOCK_VIDEO_IDS[1]: VideoFrameInfo(
              video_id=MOCK_VIDEO_IDS[1],
              location=f"{directory}/{MOCK_VIDEO_IDS[1]}",
              frame_file_stem=frame_file_stem,
              frame_string_length=16,
              min_frame_number=2,
              max_frame_number=3001,
              file_extension=file_extension,
          ),
          MOCK_VIDEO_IDS[2]: VideoFrameInfo(
              video_id=MOCK_VIDEO_IDS[2],
              location=f"{directory}/{MOCK_VIDEO_IDS[2]}",
              frame_file_stem=frame_file_stem,
              frame_string_length=16,
              min_frame_number=1,
              max_frame_number=30003,
              file_extension=file_extension,
          ),
          MOCK_VIDEO_IDS[3]: VideoFrameInfo(
              video_id=MOCK_VIDEO_IDS[3],
              location=f"{directory}/{MOCK_VIDEO_IDS[3]}",
              frame_file_stem=frame_file_stem,
              frame_string_length=16,
              min_frame_number=1,
              max_frame_number=1530,
              file_extension=file_extension,
          ),
      }
  
file_path: pytorchvideo/tests/utils.py
imports: import contextlib
  import os
  import pathlib
  import tempfile
  import av
  import numpy
  import torch
  import torchvision.io
  import torchvision.transforms
  from pytorchvideo.data.dataset_manifest_utils import EncodedVideoInfo, VideoFrameInfo, VideoInfo
  from pytorchvideo.data.utils import thwc_to_cthw
label_desc: Use image node_id 8 for calling a global function with example usage: get_flat_video_frames(directory, file_extension) and returns: dict