def compare_set_genes_list(training_df, validation_df, test_df):
    """
    Compare the 3 sets to see how many genes they have in common.
    :param training_df: pandas dataframe containing the training data
    :param validation_df: pandas dataframe containing the validation data
    :param test_df: pandas dataframe containing the test data
    :return: 4 lists. Each list has the shared genes between different sets:
    genes shared between train and validation
    genes shared between train and test
    genes shared between validation and test
    genes shared between all 3 sets

    """
    train_set_genes = set(training_df['gene_symbol'])
    validation_set_genes = set(validation_df['gene_symbol'])
    test_set_genes = set(test_df['gene_symbol'])

    train_validation_shared_genes_list = list(set(train_set_genes) & set(validation_set_genes))
    train_test_shared_genes_list = list(set(train_set_genes) & set(test_set_genes))
    validation_test_shared_genes_list = list(set(test_set_genes) & set(validation_set_genes))
    all_shared_genes_list = list(set(train_set_genes) & set(validation_set_genes) & set(test_set_genes))

    print("Number of shared genes between train and validation: ", len(train_validation_shared_genes_list))
    print("Number of shared genes between train and test: ", len(train_test_shared_genes_list))
    print("Number of shared genes between validation and test: ", len(validation_test_shared_genes_list))
    print("Number of shared genes between all 3 sets: ", len(all_shared_genes_list))
    print ("\n")


    return train_validation_shared_genes_list, train_test_shared_genes_list, validation_test_shared_genes_list, all_shared_genes_list