def METHOD_NAME(self, state, dict_, passive=attributes.PASSIVE_OFF):
    if self.key in dict_:
        return dict_[self.key]
    # Retrieve the session bound to the state in order to perform
    # a lazy query for the attribute.
    session = _state_session(state)
    if session is None:
        # State is not bound to a session; we cannot proceed.
        return None
    # Find class for discriminator.
    # TODO: Perhaps optimize with some sort of lookup?
    discriminator = self.get_state_discriminator(state)
    target_class = _get_class_registry(state.class_).METHOD_NAME(discriminator)
    if target_class is None:
        # Unknown discriminator; return nothing.
        return None
    id = self.get_state_id(state)
    try:
        target = session.METHOD_NAME(target_class, id)
    except AttributeError:
        # sqlalchemy 1.3
        target = session.query(target_class).METHOD_NAME(id)
    # Return found (or not found) target.
    return target