def are_features_consistent(train_df, test_df, dependent_variables=None):
    """Verifies that features in training and test sets are consistent

    Training set and test set should have the same features/columns, except for the dependent variables

    train_dr: pd.DataFrame      training dataset
    test_df:  pd.DataFrame      test dataset
    dependent_variables: list   list of column names for the dependent variables
    """
    if dependent_variables is None:
        features_training_set = train_df.columns
    else:
        features_training_set = train_df.drop(dependent_variables, axis=1).columns
    features_test_set = test_df.columns
    features_diff = set(features_training_set).symmetric_difference(features_test_set)
    assert features_diff == set(), f"Discrepancy between training and test feature set: {features_diff}"

    return True