def has_option(self, property_group, prop, option):
        """
        Returns True if the variant has the given property / option combination.
        """
        from lfs.caching.utils import get_cache_group_id
        pid = self.get_parent().pk
        properties_version = get_cache_group_id('global-properties-version')
        group_id = '%s-%s' % (properties_version, get_cache_group_id('properties-%s' % pid))
        options = cache.get("%s-%s-productpropertyvalue%s" % (settings.CACHE_MIDDLEWARE_KEY_PREFIX, group_id, self.id))
        if options is None:
            options = {}
            for pvo in self.property_values.filter(property_group=property_group):
                options[pvo.property_id] = pvo.value
            cache.set("%s-%s-productpropertyvalue%s" % (settings.CACHE_MIDDLEWARE_KEY_PREFIX, group_id, self.id), options)

        try:
            return options[prop.id] == str(option.id)
        except __HOLE__:
            return False
dataset/ETHPy150Open diefenbach/django-lfs/lfs/catalog/models.py/Product.has_option