def get_header(message, name):
header = message.get(name)<EOL>log.debug("<STR_LIT>".format(name, header))<EOL>if header:<EOL><INDENT>return decode_header_part(header)<EOL><DEDENT>return six.text_type()<EOL>
Gets an email.message.Message and a header name and returns
the mail header decoded with the correct charset.

Args:
    message (email.message.Message): email message object
    name (string): header to get

Returns:
    decoded header