$form_object = $form_state->getFormObject();
if ($form_object instanceof ContentEntityFormInterface && $display = $form_object->getFormDisplay($form_state)) {
if ($display instanceof EntityDisplayWithLayoutInterface) {
$form_object = $form_state->getFormObject();
if ($form_object instanceof ContentEntityFormInterface && $display = $form_object->getFormDisplay($form_state)) {
if ($display instanceof EntityDisplayWithLayoutInterface) {