human
Here's a good function header given the following:
I wrote the below code

    def _parseHTTPContentType(content_type):
        "takes    HTTP    Content-Type    header    and    returns    (content    type,    charset)\n\n                                If    no    charset    is    specified,    returns    (content    type,    '')\n                                If    no    content    type    is    specified,    returns    ('',    '')\n                                Both    return    parameters    are    guaranteed    to    be    lowercase    strings\n                                "
        content_type = (content_type or '')
        (content_type, params) = cgi.parse_header(content_type)
        charset = params.get('charset', '').replace("'", '')
        if (not isinstance(charset, unicode)):
            charset = charset.decode('utf-8', 'ignore')
        return (content_type, charset)
    sniffed_xml_encoding = u''
    xml_encoding = u''
    true_encoding = u''
    (http_content_type, http_encoding) = _parseHTTPContentType(http_headers.get('content-type'))
    try:
        if (xml_data[:4] == _l2bytes([76, 111, 167, 148])):
            sniffed_xml_encoding = u'cp037'
            xml_data = xml_data.decode('cp037').encode('utf-8')
        elif (xml_data[:4] == _l2bytes([0, 60, 0, 63])):
            sniffed_xml_encoding = u'utf-16be'
            xml_data = unicode(xml_data, 'utf-16be').encode('utf-8')
        elif ((len(xml_data) >= 4) and (xml_data[:2] == _l2bytes([254, 255])) and (xml_data[2:4] != _l2bytes([0, 0]))):
            sniffed_xml_encoding = u'utf-16be'
            xml_data = unicode(xml_data[2:], 'utf-16be').encode('utf-8')
        elif (xml_data[:4] == _l2bytes([60, 0, 63, 0])):
            sniffed_xml_encoding = u'utf-16le'
            xml_data = unicode(xml_data, 'utf-16le').encode('utf-8')
        elif ((len(xml_data) >= 4) and (xml_data[:2] == _l2bytes([255, 254])) and (xml_data[2:4] != _l2bytes([0, 0]))):
            sniffed_xml_encoding = u'utf-16le'
            xml_data = unicode(xml_data[2:], 'utf-16le').encode('utf-8')
        elif (xml_data[:4] ==...

What's a good function header?
assistant
#Here's a good function header.

def _getCharacterEncoding(http_headers, xml_data):