public function getLoadedEntity(NodeInterface $entity): NodeInterface
    {
        $class = ClassUtils::getClass($entity);
        if (isset(self::$deferred[$class][$entity->getId()]) && self::$deferred[$class][$entity->getId()] instanceof NodeInterface) {
            return self::$deferred[$class][$entity->getId()];
        }

        //fallback
        return $entity;
    }