'Validate the value and set the attribute with it.'

def _Set(self, value, type_descriptor):

    attr = type_descriptor.name
    if (value is None):
        self._data.pop(attr, None)
        return
    value = type_descriptor.Validate(value, container=self)
    self._data[attr] = (value, None, type_descriptor)
    self.dirty = True
    return value
