Parse the ODF header and return a dict of all key / value pairs

def _parse_header(lines):
    """
    Parse the ODF header and return a dict of all key / value pairs
    """
    header_count = _extract_header_number(lines)
    header_dict = {}
    for i in range(2, header_count + 2):
        pair = _extract_header_value(lines[i])

        if not pair:  # Ignore empty strings
            continue

        header_dict.update(pair)
    return header_dict