def collect_attribute_columns(**specs):

    # filter down to only the specs with columns assigned to them
    selected_specs = {spec_name: spec for spec_name, spec in iteritems(specs)
                      if spec.columns}

    # all columns used in selections of attribute specifications
    spec_cols = list(itertools.chain.from_iterable([spec.columns
                                                    for spec in selected_specs.values()]))

    # return a list of unique columns in order as they appear
    return ordered_set(spec_cols)
Collect list of unique and ordered columns across attribute specifications.
dataset/ETHPy150Open bokeh/bokeh/bokeh/charts/utils.py/collect_attribute_columns