import functools


def collect_keys(table):
    """
    Collects all names of keys (columns) used throughout the data
    """
    just_keys = map(lambda entry: set(entry.keys()), table)
    return sorted(list(functools.reduce(set.union, just_keys)))