def _filter_df_day_shot(
        df,
        day_shot_list,
        return_mask=False
):
    """
    Filters a dataframe by date and shot number for an arbitrary number of
    date/shot combinations. Returns the indices (for masking) and the filtered
    dataframe.

    Parameters
    ----------
    df : pd.DataFrame
        dataframe to filter. Must have columns for "date" and "shot".
    day_shot_list : List[Tuple[Str, Int, Int]]
        List of tuples containing date, start shot, and end shot. Date should
        be a string in ISO-8601 format, and start/end shots numbers should be
        integers:
        [("YYYY-MM-DD", start_shot, end_shot)]
    return_mask : bool
        if true, mask will be returned as the second item, which can be used to
        update data (e.g. inserting a spatial calibration)

    Returns
    -------
    Union[Tuple[pd.DataFrame, np.array], Tuple[pd.DataFrame]]
        (filtered dataframe,) or (filtered dataframe, mask)
    """
    mask_list = [((df["date"] == date) &
                  (df["shot"] <= end_shot) &
                  (df["shot"] >= start_shot))
                 for (date, start_shot, end_shot) in day_shot_list]
    mask = [False for _ in range(len(df))]
    for m in mask_list:
        mask = m | mask
    if return_mask:
        return df[mask], mask
    else:
        return df[mask],