public function printer($valuePath, $keyPath = null, $spacer = '__')
    {
        if (!$keyPath) {
            $counter = 0;
            $keyPath = function () use (&$counter) {
                return $counter++;
            };
        }

        return new TreePrinter(
            $this->getInnerIterator(),
            $valuePath,
            $keyPath,
            $spacer,
            $this->_mode
        );
    }