def _num_pre_blank_frames(stim_dict):
    """
    _num_pre_blank_frames(stim_dict)

    Retrieves number of blank frames before stimulus starts.

    Arguments:
        stim_dict (dict): An Allen Institute session stimulus dictionary.

    Returns:
        num_pre_blank_frames (int): number of blank frames before stimulus starts.
    """

    stimulus_fps = stim_dict["fps"]
    num_pre_blank_frames = int(stim_dict["pre_blank_sec"] * stimulus_fps)
    return num_pre_blank_frames