def get_views(result_df,colored=False):
    """
    return a list of tuples of the views of the dataset that have at least one
    trend. Assumes no views are listed in in opposite orders

    Parameters
    -----------
    result_df : DataFrame
        reustls generated by detect_simpsons_paradox
    colored : Boolean
        use 'colored' views or not if True, a view is defined by 2 features and
        a grouping variable, if False a view is defined by 2 features only


    Returns
    ---------
    sp_views_unique : list of tuples
        list of the view pairs

    """
    # get all the views in a zip iterator
    if colored:
        views_per_occurence = zip(result_df['independent'].values,
                            result_df['dependent'].values,
                                    result_df['splitby'].values)
        views_unique = set([(a,b,c) for a,b,c in views_per_occurence])
    else:
        # uncolored (no grouping var)
        views_per_occurence = zip(result_df['independent'].values,
                                 result_df['dependent'].values)
        # iterate over pairs to make list, get unique by type casting to a set
        views_unique = set([(a,b) for a,b in views_per_occurence])

    # type cast back to list to return
    return list(views_unique)