public static function getParentForm(BlockInterface $block)
    {
        $form = $block->getForm();

        if (null !== $form) {
            return $form;
        }

        return null !== $block->getParent()
            ? static::getParentForm($block->getParent())
            : null;
    }