private function setWorkflowStageOnNode(NodeInterface $node, $locale, $workflowStage, \DateTime $publishDate = null)
    {
        $node->setProperty(
            $this->propertyEncoder->localizedSystemName(self::WORKFLOW_STAGE_FIELD, $locale),
            $workflowStage
        );

        if ($publishDate) {
            $node->setProperty(
                $this->propertyEncoder->localizedSystemName(self::PUBLISHED_FIELD, $locale),
                $publishDate
            );
        }
    }