def _save_single_attr(self, entity, value=None, schema=None,<EOL>create_nulls=False, extra={}):
<EOL>schema = schema or self<EOL>lookups = dict(get_entity_lookups(entity), schema=schema, **extra)<EOL>try:<EOL><INDENT>attr = self.attrs.get(**lookups)<EOL><DEDENT>except self.attrs.model.DoesNotExist:<EOL><INDENT>attr = self.attrs.model(**lookups)<EOL><DEDENT>if create_nulls or value != attr.value:<EOL><INDENT>attr.value = value<EOL>for k,v in extra.items():<EOL><INDENT>setattr(attr, k, v)<EOL><DEDENT>attr.save()<EOL><DEDENT>
Creates or updates an EAV attribute for given entity with given value.

:param schema: schema for attribute. Default it current schema instance.
:param create_nulls: boolean: if True, even attributes with value=None
    are created (by default they are skipped).
:param extra: dict: additional data for Attr instance (e.g. title).