protected function calculateNodeDepthFromRelativeLevel($relativeLevel, NodeInterface $referenceNode)
    {
        if ($relativeLevel > 0) {
            $depth = $relativeLevel;
        } else {
            $currentSiteDepth = $this->getNodeLevelInSite($referenceNode);
            if ($currentSiteDepth + $relativeLevel < 1) {
                $depth = 1;
            } else {
                $depth = $currentSiteDepth + $relativeLevel + 1;
            }
        }

        return $depth;
    }