'Internal helper to deserialize this property from a protocol buffer.
Subclasses may override this method.
Args:
entity: The entity, a Model (subclass) instance.
p: A Property Message object (a protocol buffer).
depth: Optional nesting depth, default 1 (unused here, but used
by some subclasses that override this method).'

def _deserialize(self, entity, p, unused_depth=1):

    if (p.meaning() == entity_pb.Property.EMPTY_LIST):
        self._store_value(entity, [])
        return
    val = self._db_get_value(p.value(), p)
    if (val is not None):
        val = _BaseValue(val)
    if self._repeated:
        if self._has_value(entity):
            value = self._retrieve_value(entity)
            assert isinstance(value, list), repr(value)
            value.append(val)
        else:
            value = [val]
    else:
        value = val
    self._store_value(entity, value)
