def _set_value(self, entity, value):
if value is not None:<EOL><INDENT>value = _validate_key(value, entity=entity)<EOL>value = entity._validate_key(value)<EOL><DEDENT>entity._entity_key = value<EOL>
Setter for key attribute.