'Return the most appropriate Response class for the given mimetype'

def from_mimetype(self, mimetype):

    if (mimetype is None):
        return Response
    elif (mimetype in self.classes):
        return self.classes[mimetype]
    else:
        basetype = ('%s/*' % mimetype.split('/')[0])
        return self.classes.get(basetype, Response)
