from typing import Optional


def frame_index_to_seconds(
    frame_index: int, fps: int, zero_indexed: Optional[bool] = True
) -> float:
    """Converts a frame index within a video clip to the corresponding
    point in time (in seconds) within the video, based on a specified frame rate.

    Args:
        frame_index (int): The index of the frame within the video.
        fps (int): The frame rate (frames per second) of the video.
        zero_indexed (Optional[bool]): Whether the specified frame is zero-indexed
            (if True) or one-indexed (if False).

    Returns:
        (float) The point in time within the video.
    """
    if not zero_indexed:
        frame_index -= 1
    time_in_seconds = frame_index / fps
    return time_in_seconds