private function getTwigBlockContent(
        TwigBlockDefinitionInterface $blockDefinition,
        Block $block,
        array $parameters
    ): string {
        if (!isset($parameters['twig_template'])) {
            return '';
        }

        if (!$parameters['twig_template'] instanceof ContextualizedTwigTemplate) {
            return '';
        }

        return $parameters['twig_template']->renderBlock(
            $blockDefinition->getTwigBlockName($block)
        );
    }