def parse_headers(message):
    """
    We must parse the headers because Python's Message class hides a
    dictionary type object but doesn't implement all of it's methods
    like copy or iteritems.

    """
    d = {}

    for k, v in message.items():
        d[k] = v

    return d