code: def _find_frame_index(
      frame_filename: str, all_video_frame_paths: List[epath.PathLike]
  ) -> int:
      for index, path in enumerate(all_video_frame_paths):
          if frame_filename in os.fspath(path):
              return index
      assert False, (
          "Annotations are corrupt or videos have not been properly "
          f"downloaded. File {frame_filename} not found in "
          f"{all_video_frame_paths}."
      )
  
imports: from __future__ import annotations
  import collections
  import json
  import os
  from typing import Any, Dict, List, Optional, Tuple, Union
  from etils import epath
  import numpy
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling a global function with example usage: _find_frame_index(frame_filename, all_video_frame_paths) and returns: index