def _set_value(self, new_value):
        if self.attribute.is_option and isinstance(new_value, six.string_types):
            # Need to look up instance of AttributeOption
            new_value = self.attribute.option_group.options.get(
                option=new_value)
        setattr(self, 'value_%s' % self.attribute.type, new_value)
dataset/ETHPy150Open django-oscar/django-oscar/src/oscar/apps/catalogue/abstract_models.py/AbstractProductAttributeValue._set_value/original