import mimetypes
    >>> mimetypes.guess_type("foo.mp3")
    ('audio/mpeg', None)