'Return a precedence level from 0-3 for the media type given how specific it is.'

@property
def precedence(self):

    if (self.main_type == u'*'):
        return 0
    elif (self.sub_type == u'*'):
        return 1
    elif ((not self.params) or (list(self.params.keys()) == [u'q'])):
        return 2
    return 3
