'Determines whether or not the client accepts a given media type.
Args:
media_type (str): An Internet media type to check.
Returns:
bool: ``True`` if the client has indicated in the Accept header
that it accepts the specified media type. Otherwise, returns
``False``.'

def client_accepts(self, media_type):

    accept = self.accept
    if ((accept == media_type) or (accept == '*/*')):
        return True
    try:
        return (mimeparse.quality(media_type, accept) != 0.0)
    except ValueError:
        return False
