def _make_compound_key(table, key):
    """Returns a list of columns from `column_key` for `table` representing
    potentially a compound key. The `column_key` can be a name of a single
    column or list of column names."""

    if not isinstance(key, (list, tuple)):
        key = [key]

    return [table.columns[name] for name in key]