def time_gap_shift_1_features(data_df, mini_data_df):
    """
    For each member, compute:
    1. time gap between current booking date and previous booking date/next booking date
    2. time gap between current checkin date and previous checkin date/next checkin date
    3. time gap between current checkout date and previous checkout date/next checkout date
    For each member-resort combination, compute:
    1. time gap between current booking date and previous booking date/next booking date
    2. time gap between current checkin date and previous checkin date/next checkin date
    :param data_df: full_data
    :param mini_data_df: mini_data
    :return: modified mini_data
    """
    # Compute time gap between current booking date and previous booking date/next booking date for each memberid and
    # add it to mini_data
    data_df['prev_booking_date_in_seconds'] = data_df.groupby('memberid')['booking_date_in_seconds'].shift(1)
    mini_data_df['time_gap_booking_prev'] = data_df['booking_date_in_seconds'] - data_df[
        'prev_booking_date_in_seconds']

    data_df['next_booking_date_in_seconds'] = data_df.groupby('memberid')['booking_date_in_seconds'].shift(-1)
    mini_data_df['time_gap_booking_next'] = data_df['next_booking_date_in_seconds'] - data_df[
        'booking_date_in_seconds']

    # Compute time gap between current checkin date and previous checkin date/next checkin date for each memberid and
    # add it to mini_data
    data_df['prev_checkin_date_in_seconds'] = data_df.groupby('memberid')['checkin_date_in_seconds'].shift(1)
    mini_data_df['time_gap_checkin_prev'] = data_df['checkin_date_in_seconds'] - data_df[
        'prev_checkin_date_in_seconds']

    data_df['next_checkin_date_in_seconds'] = data_df.groupby('memberid')['checkin_date_in_seconds'].shift(-1)
    mini_data_df['time_gap_checkin_next'] = data_df['next_checkin_date_in_seconds'] - data_df[
        'checkin_date_in_seconds']

    # Compute time gap between current checkout date and previous checkout date/next checkout date for each memberid
    # and add it to mini_data
    data_df['prev_checkout_date_in_seconds'] = data_df.groupby('memberid')['checkout_date_in_seconds'].shift(1)
    mini_data_df['time_gap_checkout_prev'] = data_df['checkout_date_in_seconds'] - data_df[
        'prev_checkout_date_in_seconds']

    data_df['next_checkout_date_in_seconds'] = data_df.groupby('memberid')['checkout_date_in_seconds'].shift(-1)
    mini_data_df['time_gap_checkout_next'] = data_df['next_checkout_date_in_seconds'] - data_df[
        'checkout_date_in_seconds']

    # Compute time gap between current booking date and previous booking date/next booking date for each
    # memberid-resort_id combination and add it to mini_data
    data_df['prev_resort_booking_date_in_seconds'] = data_df.groupby(['memberid', 'resort_id'])[
        'booking_date_in_seconds'].shift(1)
    mini_data_df['time_gap_booking_prev_resort'] = data_df['booking_date_in_seconds'] - data_df[
        'prev_resort_booking_date_in_seconds']

    data_df['next_resort_booking_date_in_seconds'] = data_df.groupby(['memberid', 'resort_id'])[
        'booking_date_in_seconds'].shift(-1)
    mini_data_df['time_gap_booking_next_resort'] = data_df['next_resort_booking_date_in_seconds'] - data_df[
        'booking_date_in_seconds']

    # Compute time gap between current checkin date and previous checkin date/next checkin date for each
    # memberid-resort_id combination and add it to mini_data
    data_df['prev_resort_checkin_date_in_seconds'] = data_df.groupby(['memberid', 'resort_id'])[
        'checkin_date_in_seconds'].shift(1)
    mini_data_df['time_gap_checkin_prev_resort'] = data_df['checkin_date_in_seconds'] - data_df[
        'prev_resort_checkin_date_in_seconds']

    data_df['next_resort_checkin_date_in_seconds'] = data_df.groupby(['memberid', 'resort_id'])[
        'checkin_date_in_seconds'].shift(-1)
    mini_data_df['time_gap_checkin_next_resort'] = data_df['next_resort_checkin_date_in_seconds'] - data_df[
        'checkin_date_in_seconds']

    return mini_data_df