code: def test_build_encoded_manifest_from_nested_directory(self):
      file_names = [
          "P01_01.mp4",
          "P01_07.mp4",
          "P23_11.mp4",
          "P11_00.mp4",
      ]
      with tempfile.TemporaryDirectory(
          prefix="TestEpicKitchenUtils"
      ) as tempdir:
          for file_name in file_names:
              participant_path = Path(tempdir) / file_name[:3]
              if not os.path.isdir(participant_path):
                  os.mkdir(participant_path)
  
              with open(participant_path / file_name, "w") as f:
                  f.write("0")
  
          encoded_video_dict = (
              build_encoded_manifest_from_nested_directory(tempdir)
          )
  
          self.assertEqual(
              sorted(encoded_video_dict),
              ["P01_01", "P01_07", "P11_00", "P23_11"],
          )
          self.assertEqual(
              encoded_video_dict["P01_01"],
              EncodedVideoInfo(
                  "P01_01", str(Path(tempdir) / "P01/P01_01.mp4")
              ),
          )
          self.assertEqual(
              encoded_video_dict["P01_07"],
              EncodedVideoInfo(
                  "P01_07", str(Path(tempdir) / "P01/P01_07.mp4")
              ),
          )
          self.assertEqual(
              encoded_video_dict["P11_00"],
              EncodedVideoInfo(
                  "P11_00", str(Path(tempdir) / "P11/P11_00.mp4")
              ),
          )
          self.assertEqual(
              encoded_video_dict["P23_11"],
              EncodedVideoInfo(
                  "P23_11", str(Path(tempdir) / "P23/P23_11.mp4")
              ),
          )
  
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 5 for calling the TestEpicKitchenUtils obj's underlying member method code with example usage: obj.test_build_encoded_manifest_from_nested_directory() without return types