protected function processBatch(NodeTemplate $nodeTemplate = null)
    {
        $records = $this->dataProvider->fetch();
        if (!\is_iterable($records)) {
            throw new Exception(sprintf('Expected records as an array while calling %s->fetch(), but returned %s instead.', get_class($this->dataProvider), gettype($records)), 1462960769826);
        }
        $records = $this->preProcessing($records);

        foreach ($records as $data) {
            if (!\is_array($data)) {
                $data = $this->propertyMapper->convert($data, 'array');
            }
            $this->processRecord($nodeTemplate, $data);
            ++$this->processedRecords;
        }

        $this->postProcessing($records);
    }