Process callback to embed an entity form.
array $element: The containing element.
\Drupal\Core\Form\FormStateInterface $form_state: The form state.
array The containing element, with the entity form inserted.
public static function processEmbeddedEntityForm(array $element, FormStateInterface $form_state) {
/** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
$entity = $element['#entity'];
EntityFormDisplay::collectRenderDisplay($entity, 'default')
->buildForm($entity, $element, $form_state);
return $element;
}