code: def generate_splits(
      index_options: List[int], train_fraction: float = 0.8
  ) -> List[List[int]]:
      """
      Get indices for train, val, test splits.
      """
      num_images = len(index_options)
      np.random.shuffle(index_options)
      train_index = int(train_fraction * num_images)
      val_index = train_index + ((num_images - train_index) // 2)
      train_indices = index_options[:train_index]
      val_indices = index_options[train_index:val_index]
      test_indices = index_options[val_index:]
      split_indices = [train_indices, val_indices, test_indices]
      return split_indices
  
file_path: pytorchvideo/projects/video_nerf/dataset_utils.py
imports: import os
  import struct
  import sys
  from typing import List, Tuple
  import numpy
  import torch
  from objectron.schema import a_r_capture_metadata_pb2
  from PIL import Image
  from pytorch3d.transforms import Rotate, RotateAxisAngle, Translate
label_desc: Use image node_id 2 for calling a global function with example usage: generate_splits(index_options, train_fraction) and returns: split_indices