code: def write_mock_frame_files(video_frames, tempdir, ext):
      tempdir = Path(tempdir)
      for _, video_frame_info in video_frames.items():
          if not os.path.isdir(video_frame_info.location):
              os.mkdir(video_frame_info.location)
  
          for frame_num in reversed(
              range(
                  video_frame_info.min_frame_number,
                  video_frame_info.max_frame_number + 1,
              )
          ):  # Here we reverse the order of the frames we write to test that code
              # doesn't rely on ls returning frames in order due to
              # frames being written in order temporally.
              frame_num_str = str(frame_num)
              stem = video_frame_info.frame_file_stem
              frame_num_zeros = "0" * (
                  video_frame_info.frame_string_length
                  - len(frame_num_str)
                  - len(stem)
              )
              frame_file_name = (
                  f"{stem}{frame_num_zeros}{frame_num_str}.{ext}"
              )
              with open(
                  f"{video_frame_info.location}/{frame_file_name}", "w"
              ) as f:
                  f.write("0")
  
file_path: pytorchvideo/tests/test_data_epic_kitchen_utils.py
imports: import os
  import tempfile
  import unittest
  import unittest.mock
  from pathlib import Path
  from pytorchvideo.data.dataset_manifest_utils import EncodedVideoInfo, VideoFrameInfo
  from pytorchvideo.data.epic_kitchen.utils import build_encoded_manifest_from_nested_directory, build_frame_manifest_from_flat_directory, build_frame_manifest_from_nested_directory
label_desc: Use image node_id 1 for calling a global function with example usage: write_mock_frame_files(video_frames, tempdir, ext) without return types