def get_option(self, property_id):
        """
        Returns the id of the selected option for property with passed id.
        """
        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))
        cache_key = "%s-%s-productpropertyvalue%s" % (settings.CACHE_MIDDLEWARE_KEY_PREFIX, group_id, self.id)
        options = cache.get(cache_key)
        if options is None:
            options = {}
            for pvo in self.property_values.all():
                options[pvo.property_id] = pvo.value
            cache.set(cache_key, options)
        try:
            return options[property_id]
        except __HOLE__:
            return None
dataset/ETHPy150Open diefenbach/django-lfs/lfs/catalog/models.py/Product.get_option