def METHOD_NAME(self) -> None:
    if self.prop.stub:
        raise InvalidMapping("Property for [%r] is a stub" % self.prop)
    if self.prop.deprecated:
        warn(
            "Mapping uses a deprecated property: %r" % self.prop,
            DeprecationWarning,
            stacklevel=2,
        )
    if self.entity is None:
        return
    # Figure out if the schema types of the referenced entities
    # are of a type compatible with the range of this property.
    # For example, an asset can be owned by a legal entity, but
    # by a bank payment or a ship.
    for entity in self.query.entities:
        if entity.name != self.entity:
            continue
        if not self.prop.range or not entity.schema.is_a(self.prop.range):
            raise InvalidMapping(
                "The entity [%r] must be a %s (not %s)"
                % (self.prop, self.prop.range, entity.schema.name)
            )  # noqa
        return
    raise InvalidMapping(
        "No entity [%s] for property [%r]" % (self.entity, self.prop)
    )