def get_headers(data):
    """Loop through the data and collect any headers.
    :param data list[dict]:
    :rtype: set[str]
    :returns: set of headers
    """
    return {k for row in data for k, _ in row.iteritems()} if data is not None else None