# Pastebin RSYKOzxp >>> guessed_type, _junk = mimetypes.guess_type('test.xml.gz') >>> print(guessed_type) application/xml