def match_media_queries(self):
        matches = {}
        media_queries = self.get_media_queries()
        for alias, config in six.iteritems(media_queries):
            yesno = []
            if config['min_width']:
                yesno.append(self.width >= config['min_width'])
            if config['max_width']:
                yesno.append(self.width <= config['max_width'])
            if config['min_height']:
                yesno.append(self.height >= config['min_height'])
            if config['max_height']:
                yesno.append(self.height <= config['max_height'])
            if config['pixel_ratio']:
                yesno.append(self.pixel_ratio == config['pixel_ratio'])

            matches[alias] = all(yesno)
        return matches
dataset/ETHPy150Open mishbahr/django-responsive2/responsive/utils.py/Device.match_media_queries/original