'Return the targeted :class:`.Mapper` for this
:class:`.RelationshipProperty`.
This is a lazy-initializing static attribute.'

@util.memoized_property
def mapper(self):

    if (util.callable(self.argument) and (not isinstance(self.argument, (type, mapperlib.Mapper)))):
        argument = self.argument()
    else:
        argument = self.argument
    if isinstance(argument, type):
        mapper_ = mapperlib.class_mapper(argument, configure=False)
    elif isinstance(self.argument, mapperlib.Mapper):
        mapper_ = argument
    else:
        raise sa_exc.ArgumentError(("relationship    '%s'    expects    a    class    or    a    mapper    argument    (received:    %s)" % (self.key, type(argument))))
    return mapper_
