'Helper function to parse blocks of GNTP headers into a dictionary
:param string data:
:return dict: Dictionary of parsed GNTP Headers'

def _parse_dict(self, data):

    d = {}
    for line in data.split('\r\n'):
        match = GNTP_HEADER.match(line)
        if (not match):
            continue
        key = match.group(1).strip()
        val = match.group(2).strip()
        d[key] = val
    return d
