/** {@inheritDoc} */
 public function slice($offset, $length = null)
 {
     if (!$this->isInitialized()) {
         $nodeNames = $this->getOriginalNodeNames();
         if (!is_numeric($offset)) {
             $offset = array_search($offset, $nodeNames);
             if (false === $offset) {
                 return new ArrayCollection();
             }
         }
         $nodeNames = array_slice($nodeNames, $offset, $length);
         $parentPath = $this->getNode($this->fetchDepth)->getPath();
         array_walk($nodeNames, function (&$nodeName) use($parentPath) {
             $nodeName = "{$parentPath}/{$nodeName}";
         });
         $childNodes = $this->dm->getPhpcrSession()->getNodes($nodeNames);
         return $this->getChildren($childNodes);
     }
     if (!is_numeric($offset)) {
         $nodeNames = $this->collection->getKeys();
         $offset = array_search($offset, $nodeNames);
         if (false === $offset) {
             return new ArrayCollection();
         }
     }
     return parent::slice($offset, $length);
 }