def get_second_year_rlv(features, cohort_invoices):
    """
    The second year Residual Lifetime Value of each customer
    """
    cohort_invoices = cohort_invoices.copy()
    features = features.copy()

    second_year_cohort_revenues = cohort_invoices.groupby('CustomerID')['Revenue'].sum().reset_index()
    second_year_cohort_revenues.columns = ['CustomerID', 'SecondYearRLV']
    features = features.merge(second_year_cohort_revenues, how='left', on='CustomerID')
    features.fillna(value=0, inplace=True)

    return features