Verify that DataFrames in ``frames`` have the same indexing scheme and are
    aligned to ``calendar``.

    Parameters
    ----------
    frames : list[pd.DataFrame]
    calendar : trading_calendars.TradingCalendar

    Raises
    ------
    ValueError
        If frames have different indexes/columns, or if frame indexes do not
        match a contiguous region of ``calendar``.

def verify_frames_aligned(frames, calendar):
    """
    Verify that DataFrames in ``frames`` have the same indexing scheme and are
    aligned to ``calendar``.

    Parameters
    ----------
    frames : list[pd.DataFrame]
    calendar : trading_calendars.TradingCalendar

    Raises
    ------
    ValueError
        If frames have different indexes/columns, or if frame indexes do not
        match a contiguous region of ``calendar``.
    """
    indexes = [f.index for f in frames]
    check_indexes_all_same(indexes, message="DataFrame indexes don't match:")

    columns = [f.columns for f in frames]
    check_indexes_all_same(columns, message="DataFrame columns don't match:")

    start, end = indexes[0][[0, -1]]
    cal_sessions = calendar.sessions_in_range(start, end)

    check_indexes_all_same(
        [indexes[0], cal_sessions],
        "DataFrame index doesn't match {} calendar:".format(calendar.name),
    )